Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread José Mejuto via fpc-pascal
El 03/07/2023 a las 10:27, Hairy Pixels via fpc-pascal escribió: Right now I've just read the file into an AnsiString and indexing assuming a fixed character size, which breaks of course if non-1 byte characters exist I also need to know if I come across something like \u1F496 I need to

Re: [fpc-pascal] SetFileTime

2023-05-03 Thread José Mejuto via fpc-pascal
El 03/05/2023 a las 8:48, Carsten Bager via fpc-pascal escribió: > I am trying to change the file date on a SYMLINK (not the file that the > link points to). > Does anyone know if there is a method for this under Windows. > Carsten Hello, Attached is a dirty implementation of "touch" for

Re: [fpc-pascal] RTLEventWaitFor

2022-04-05 Thread José Mejuto via fpc-pascal
El 05/04/2022 a las 1:03, Mattias Gaertner via fpc-pascal escribió: Hi Michael, Under Linux a RTLEventWaitFor(e,1) usually waits at most 1ms. But under Windows it usually waits at least 15ms. It seems to round to nearest 1/64 of a second. Googling this lead me to question the sanity of some

Re: [fpc-pascal] Reading Serial Hex Data

2020-12-28 Thread José Mejuto via fpc-pascal
El 28/12/2020 a las 2:02, James Richters via fpc-pascal escribió: I think I figured out why my writeln's are causing an issue.. they are introducing a delay between the SerWrite and SerRead... and the device I am reading is timing out and sending it's response a second time. Hello, None of

Re: [fpc-pascal] FPC 3.2fixes UTF8Decode strange place

2020-11-02 Thread José Mejuto via fpc-pascal
El 01/11/2020 a las 20:36, AlexeyT via fpc-pascal escribió: @/José Mejuto, can you pls simplify this place, ie remove "if /IBYTE = 10" + then/else. Hello, I don't have write access, so no, I can not. -- ___ fpc-pascal maillist -

Re: [fpc-pascal] FPC 3.2fixes UTF8Decode strange place

2020-10-28 Thread José Mejuto via fpc-pascal
El 27/10/2020 a las 21:25, AlexeyT via fpc-pascal escribió: rtl/inc/ustrings.inc function UTF8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt; Source: PChar; SourceBytes: SizeUInt): SizeUInt; a) it has "If (PreChar<>13) and FALSE then" and later some big block. with a comment which

Re: [fpc-pascal] USB Human Interface Devices

2019-08-16 Thread José Mejuto
El 16/08/2019 a las 20:45, James Richters escribió: Jose, Can you tell me which relays work with your project at: https://github.com/JoshyFun/VUSBRelayPascal ? "spam" sent by private. I have inputs from my device working but not outputs, I think it would be helpful for me to learn how to

Re: [fpc-pascal] where to find materials about MP3 file format

2019-08-16 Thread José Mejuto
El 15/08/2019 a las 11:04, George Bakhtadze escribió: mp3 is a loosy audio format. It means that some part of information is lost while encoding. So doing a decoding/encoding cycle just to remove some piece of file is a bad idea. I'd try to find a way to remove piece of audio data without

Re: [fpc-pascal] USB Human Interface Devices

2019-08-15 Thread José Mejuto
El 15/08/2019 a las 15:11, James Richters escribió: Yes, in device manager I see it listed as "HID-compliant vendor-defined device" also Zadig identifies it as "USB Input Device" and it shows Driver: HidUsb (v10.1.17763.1) Is there a way to use the windows system HID interface with FPC

Re: [fpc-pascal] where to find materials about MP3 file format

2019-08-15 Thread José Mejuto
El 14/08/2019 a las 22:23, Mgr. Janusz Chmiel escribió: I have A very big and non easy dream. Making similar MP3 editor like MP3 direct cut for Windows is. But sure! [...] operations to assign beginning of block and its end. And mainly, I want to use remove block command, which will hae

Re: [fpc-pascal] USB Human Interface Devices

2019-08-15 Thread José Mejuto
El 14/08/2019 a las 16:29, James Richters escribió: I'll have a look at your project.. maybe it will give me some clues. Can you tell me how to get hid.dll? I find it all very confusing, can I just download the dll somewhere or do I have to get this huge confusing package and built it

Re: [fpc-pascal] USB Human Interface Devices

2019-08-14 Thread José Mejuto
El 14/08/2019 a las 1:41, James Richters escribió: I wonder if HID devices will work at all on Windows the same as they do on Linux. I have not been able to get the HID part of the python code to work on windows yet either because the instructions given to install the packages needed Hello,

Re: [fpc-pascal] USB Human Interface Devices

2019-07-26 Thread José Mejuto
El 26/07/2019 a las 12:39, James Richters escribió: Anyone have any suggestions for an FPC only console application method or demo I could use to access this USB HID device? Hello, This is not a complete HID interface but it can help you to start working with them. It has been designed to

Re: [fpc-pascal] MD5 Hash of StringList

2019-07-04 Thread José Mejuto
El 04/07/2019 a las 18:13, James Richters escribió: Thanks you! That got me on the right path. Here's the working sample: Hash := Md5Print(MD5String(MyStringlist.Text)); Warning! That's platform dependent code due the new line sequences. -- ___

Re: [fpc-pascal] Public key algo pascal only

2019-04-08 Thread José Mejuto
El 08/04/2019 a las 11:49, Santiago A. escribió: There is no simple solution for a complex problem. RSA implies a lot of backend: several symmetric ciphers (AES, Blowfish..., that are complex by their own. You don't want to use Caesar cypher), acceptable random generator, big integer

Re: [fpc-pascal] Public key algo pascal only

2019-04-07 Thread José Mejuto
El 07/04/2019 a las 8:22, Jy V escribió: Give a look at Crypto.pas in Ultibo project at github, from memory it requires very few other pascal unit (and of course no external library or obscure binary code) I also know that XMLRAD is sharing similar feature in unit XCrypto.pas, the project is

Re: [fpc-pascal] Public key algo pascal only

2019-04-06 Thread José Mejuto
El 05/04/2019 a las 19:08, Виктор Матузенко escribió: Hi, try this https://github.com/delphi-pascal-archive/Pascal-RSA Hello, Thank you. It is a bit "monster" but maybe I can split the necessary code. Thank you again. -- ___ fpc-pascal maillist

Re: [fpc-pascal] Public key algo pascal only

2019-04-05 Thread José Mejuto
El 05/04/2019 a las 13:01, Michael Van Canneyt escribió: Maybe DCrypt has the necessary routines, Graeme Geldenhuys maintains a version that works with FPC. Hello, Thank you, I have code from DCrypt but I was looking for something much more simple which can generate the keys/certificates

[fpc-pascal] Public key algo pascal only

2019-04-05 Thread José Mejuto
Hello, Is there any public/private key algorithm, pascal only, implemented in the distribution of fpc ? Degree of security is not important, also a 3rd party unit which does not depends on a DLL or depends on another software to generate key pairs, or other tasks, would be valid too. Thank

Re: [fpc-pascal] fpPDF and support of Latin2 charset

2019-03-20 Thread José Mejuto
El 19/03/2019 a las 15:00, LacaK escribió: It seems that there is problem specific to CourierNew font (cour.ttf). With Arial (arial.ttf) it works as expected. Attached program which demonstrates problem. Hello, Can you send me by direct mail the pdf result for that program ? I´ll try to

Re: [fpc-pascal] Embedding DLL into EXE for Windows 32 bit?

2018-07-07 Thread José Mejuto
El 07/07/2018 a las 11:01, Bo Berglund escribió: 1) Include the DLL as a resource and extract it to a temp location before loading it I have seen these suggestions but the comments indicated that writing a binary file to the filesystem on startup and then calling stuff inside likely will

Re: [fpc-pascal] How to list USB devices on Windows?

2018-06-28 Thread José Mejuto
El 28/06/2018 a las 13:44, Marco van de Voort escribió: I hesitate calling it public domain, but the code snippets I collect are exactly that, visible for everyone, from postings on forums and the like. JVCL also has such code. I use it to get descriptive names for usb serials. Hello,

Re: [fpc-pascal] fpsockets

2017-10-31 Thread José Mejuto
El 30/10/2017 a las 15:40, Victor Campillo escribió: You have the function "FpIOCtl" with the option FIONREAD, I use it to read the amount of data of the reception buffer before call "fprecv" but if I remember correctly this only work when you configure the socket as asynchronous. Hello,

[fpc-pascal] fpsockets

2017-10-30 Thread José Mejuto
Hello, Do exists any way using the fpsockets family to know if a "fprecv" will block ? In other words do exists a call that return the amount of bytes that are ready to be read/received ? In the case the answer is no, does fpc has another family of socket functions ? I know synapse, lNet,

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread José Mejuto
El 11/10/2017 a las 11:00, pasc...@piments.com escribió: {$DEFINE DEVEL} Can anyone suggest a similar one key trick ? Hello, I'm using {.$DEFINE DEVEL} -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Using Serial in a TCP/RS232 gateway, how to set buffer sizes?

2017-09-06 Thread José Mejuto
El 06/09/2017 a las 21:22, Bo Berglund escribió: Inc(RxTcp, Length(Buf)); SerWrite(FComH, Buf[0], Length(Buf)); Inc(TxSer, Length(Buf)); Where could I be losing incoming serial data? Hello, Where do you check that "Length(Buf)" has been sent ? if

Re: [fpc-pascal] SVN RSS

2017-07-26 Thread José Mejuto
El 26/07/2017 a las 0:37, Andrew Haines via fpc-pascal escribió: If you only want to see commits in a feed you can use this link to the unofficial github mirror: https://github.com/graemeg/freepascal/commits/master.atom It's synced every 15 minutes. Thank you :-) --

Re: [fpc-pascal] SVN RSS

2017-07-25 Thread José Mejuto
El 25/07/2017 a las 8:33, Michael Van Canneyt escribió: Is it possible that the SVN RSS is stuck at day 21 ? https://svn.freepascal.org/feeds/fpcsvn.rss Yes. The post-commit script that creates the feed has been disabled due to time-out problems. Hello, Will it be re-enabled ? --

[fpc-pascal] SVN RSS

2017-07-24 Thread José Mejuto
Hello, Is it possible that the SVN RSS is stuck at day 21 ? https://svn.freepascal.org/feeds/fpcsvn.rss -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] for loops performance problems?

2017-07-04 Thread José Mejuto
El 04/07/2017 a las 11:09, Anthony Walter escribió: I can convert to static buffers and get good performance (if I know the text isn't changing), but I'm now curious if this specific performance issue is related to fpc's for loop code generation. What do you think? Hello, AFAIK the problem

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-29 Thread José Mejuto
El 29/06/2017 a las 10:39, Bo Berglund escribió: 3) I also noted in the comments in TurSeriale.pas: "The Windows port driver does receive callbacks in chunks that are typically 8 bytes long. With ReceiveMode = rmRAW, TSeriale will simply pass this chunks on to the application

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-28 Thread José Mejuto
El 28/06/2017 a las 23:50, James Richters escribió: The two color schemes are nothing alike. 16bit is using this RGB565 format, but 8bit colors (at least the version I was using) the colors have no real relation to their bits (see thishttps://pasteboard.co/2K38l6Gk1.png) I can't figure out

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-20 Thread José Mejuto
El 21/06/2017 a las 1:37, Bo Berglund escribió: The problem I have is that it seems only to work for COM1 or COM3, as soon as I use a higher numbered port like COM33 then it fails. What have I missed here? Is serial only able to work with the low numbered ports (single digit)? Hello, COM

Re: [fpc-pascal] SIGSEGV in fpc_check_object

2017-06-14 Thread José Mejuto
El 13/06/2017 a las 21:04, Gabor Boros escribió: Cannot have a simple test case just a dumb example. procedure TForm1.FormCreate(Sender: TObject); var x:TPanel; begin x.Free; end; With Linux no error (x is Nil before the Free call), with Windows got SIGSEGV (x is not Nil before the

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread José Mejuto
El 22/03/2017 a las 19:17, James Richters escribió: Copy the file to the hard drive with a temporary name Flush all writes to above file Delete previous backup file Rename the original file to backup file name Rename the new recently copied file to the original name Hello, Your problem seems

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread José Mejuto
El 16/03/2017 a las 16:27, Graeme Geldenhuys escribió: On 2017-03-16 14:45, Karoly Balogh (Charlie/SGR) wrote: I think there's still a master switch to disable this in the browsers. So far Firefox 52 has none. Not in the Preferences, and not in about:config either. Hello, about:config

Re: [fpc-pascal] Adding a array of float in ressource and use it ?

2017-03-08 Thread José Mejuto
El 08/03/2017 a las 0:03, Vojtěch Čihák escribió: there are different informations about *.wav, so maybe there are different impementations too. http://soundfile.sapp.org/doc/WaveFormat/

Re: [fpc-pascal] fpc and voip ?

2017-02-02 Thread José Mejuto
El 02/02/2017 a las 18:25, fredvs escribió: - Opus: only one sample-rate: 48k (easier for mixing + DSP) AbbreviationAudio bandwidth Effective sample rate NB (narrowband) 4 kHz 8 kHz MB (medium-band) 6 kHz12 kHz WB (wideband) 8

Re: [fpc-pascal] fpc and voip ?

2017-02-02 Thread José Mejuto
El 02/02/2017 a las 16:32, Santiago A. escribió: El 17/01/2017 a las 16:48, José Mejuto escribió: Maybe you may think in Opus http://opus-codec.org/ as it is open, royalty free (mp3 is not free, you must pay royalties for the encoder side) and source code is C89 so it must be compilable

Re: [fpc-pascal] How to use pipes ?

2017-02-01 Thread José Mejuto
El 01/02/2017 a las 19:55, fredvs escribió: Outframes := op_read_float(HandleOP, @Buffer[0], FramesWanted , nil); if Outframes = 0 then exit; Hello, if OutFrames < 0 then exit; The fact that op_read_float is zero is not an error, simply the amount of samples read by opus engine is zero,

Re: [fpc-pascal] Pointer hashing

2017-01-30 Thread José Mejuto
El 30/01/2017 a las 3:37, Ryan Joseph escribió: I’m trying to hash a pointer value and found some example of hash function but not sure about translations and the process in general. Hello, After addressing the ^ conversion showed by other people I have a question. Why you need to hash a

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-29 Thread José Mejuto
El 28/01/2017 a las 13:32, fredvs escribió: TOpusFileCallbacks = record read: op_read_func; seek: op_seek_func; tell: op_tell_func; close: op_close_func; end; This does not work: HandleOP := op_test_callbacks(pointer(InPipe),op_callbacks, BufferURL[0], PipeBufferSize, err);

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-27 Thread José Mejuto
El 27/01/2017 a las 3:52, fredvs escribió: Hello Silvio: Yes, we are on the good way. Following your advice, here from https-url-opus the result of : Hello, The first thing to debug this problems is to determine the expected data for opus_test_memory. Usually streams (audio, video, etc...)

Re: [fpc-pascal] fpc and voip ?

2017-01-17 Thread José Mejuto
El 17/01/2017 a las 16:28, fredvs escribió: What do you think about the flac format ? It seams to have all the feature needed on... (and flac is already integrated in uos). Hello, FLAC is basically a compressed WAV (advanced compression), so high quality sound but low compression ratio,

Re: [fpc-pascal] fpc and voip ?

2017-01-17 Thread José Mejuto
El 17/01/2017 a las 12:56, fredvs escribió: @ Jose => many thanks I will deeply study your advices. In the other side, mp3 is not a suitable format for voIP, as it have a big latency. Huh, what format would be better for voice over ip ? Hello, For conversation: G.7* (G.711 - G.7229)

Re: [fpc-pascal] fpc and voip ?

2017-01-17 Thread José Mejuto
El 16/01/2017 a las 23:10, fredvs escribió: Hello, What must be done to make: - a url-mp3-file like 1) on server That's just a file, you send it like a file with the proper MIME type, is the client that reads information from the stream as needed. - a url-mp3-chunk like 2) on server

Re: [fpc-pascal] C# translatation

2017-01-08 Thread José Mejuto
El 08/01/2017 a las 17:31, Bernd Oppolzer escribió: Please keep in mind that & is a bitwise and in C whereas && is a logical and; this makes much difference and has to be implemented or converted differently with Pascal, IMO. the closest equivalence to bitwise and in Pascal are set

Re: [fpc-pascal] file identification using libmagic

2016-12-14 Thread José Mejuto
El 14/12/2016 a las 19:53, Marc Santhoff escribió: Hi, I have made a header port of libmagic which is used by the file(1) command to identify the type of files. Usage examples are availble, too. Hello, Just a note, I was using magic.dll for Windows a few years ago and I was being forced to

Re: [fpc-pascal] TFileStream.WriteBuffer() and RAM used ?

2016-12-13 Thread José Mejuto
El 13/12/2016 a las 0:48, fredvs escribió: IMO, the problem does not come from PortAudio but from TFileStream.WriteBuffer that does not have enough RAM for writing. But maybe I do not catch something :-( Hello, In your code you were writing from uos to TMemoryStream (RAM) and when finished

Re: [fpc-pascal] TFileStream.WriteBuffer() and RAM used ?

2016-12-11 Thread José Mejuto
El 11/12/2016 a las 14:39, fredvs escribió: @ Jose : uos uses PortAudio library to grap input from devices. I will deeply study your propositions. Hello, After a fast view of PortAudio API you can produce a code like: procedure WriteStreamToFile; var F: TFileStream; lAvailableFrames:

Re: [fpc-pascal] TFileStream.WriteBuffer() and RAM used ?

2016-12-10 Thread José Mejuto
El 09/12/2016 a las 12:15, fredvs escribió: Hello. Thanks Michael for answer. What happens with the buffer in which you had data, this we do not know. Here is the schema of recording: Hello, You working schema for recording is memory related, you must transform it in a static approach

[fpc-pascal] Missing messages

2016-10-30 Thread José Mejuto
Hello, Today I had detected that some emails does not reach me in this mailing list, in fact the last ones from "leledumbo" about JSON parsing, but Graeme and Michael ones arrive successfully -- ___ fpc-pascal maillist -

Re: [fpc-pascal] C translation question

2016-10-25 Thread José Mejuto
El 25/10/2016 a las 3:56, Lars escribió: If you want to test it I can provide .exe or source code, but do not expect it to translate anything far than some trivial functions. Do you have github account... or sourceforge, I think a few other people may find it useful... Hello, No sorry, no

Re: [fpc-pascal] C translation question

2016-10-24 Thread José Mejuto
El 24/10/2016 a las 1:40, Lars escribió: Hi, what is the status of automated conversion tools? Last I remember reading about them was when I read a delphi page on how to convert header files. Are you saying that nowadways you can actually convert plain C code to fpc, not just header files but

Re: [fpc-pascal] importtl tool

2016-10-24 Thread José Mejuto
El 24/10/2016 a las 8:17, LacaK escribió: I'm not "sure" because if the flag does not tell us nothing (no IN, no OUT) I do not know if there is a "default behavior" except the "ByRef" flag and both "constref" and "var" are "ByRef". I have found:

Re: [fpc-pascal] C translation question

2016-10-22 Thread José Mejuto
El 22/10/2016 a las 11:59, Ryan Joseph escribió: j := i + 1; might want this at the end of the loop. Doing that defiantly broke it. I think “j” is being set inside the for() construct and before each pass of the loop. The author explains the for loop even but the fact it requires an

Re: [fpc-pascal] importtl tool

2016-10-21 Thread José Mejuto
El 21/10/2016 a las 13:57, LacaK escribió: To note that both "constref" are intentional. Ok I can create patch if we (you ;-)) are sure that it is okay ? -Laco. Hello, I'm not "sure" because if the flag does not tell us nothing (no IN, no OUT) I do not know if there is a "default behavior"

Re: [fpc-pascal] importtl tool

2016-10-21 Thread José Mejuto
El 21/10/2016 a las 12:32, LacaK escribió: So result should be: case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and (PARAMFLAG_FIN or PARAMFLAG_FOUT) of PARAMFLAG_FIN or PARAMFLAG_FOUT:sPar:='var '; PARAMFLAG_FOUT:sPar:='out '; else

Re: [fpc-pascal] importtl tool

2016-10-21 Thread José Mejuto
El 21/10/2016 a las 12:05, LacaK escribió: - in typelib.pas is on line 631 vt=VT_PTR and sl='PWideString' ('P' is deleted on line 635) wParamFlags=0 When I add "else" part: case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and (PARAMFLAG_FIN or PARAMFLAG_FOUT) of

Re: [fpc-pascal] importtl tool

2016-10-20 Thread José Mejuto
El 20/10/2016 a las 15:20, LacaK escribió: There is: if bParamByRef then case FD^.lprgelemdescParam[k].paramdesc.wParamFlags and (PARAMFLAG_FIN or PARAMFLAG_FOUT) of PARAMFLAG_FIN or PARAMFLAG_FOUT:sPar:='var '; PARAMFLAG_FOUT:sPar:='out ';

Re: [fpc-pascal] importtl tool

2016-10-20 Thread José Mejuto
El 20/10/2016 a las 11:09, LacaK escribió: Hi, I have noticed, that tool for importing type library into pas incorrectly imports interface methods, which should have "var" parameter. For example in my case imported: function ScGetStringValue(Type_:Integer;Value:WideString):Integer;dispid

Re: [fpc-pascal] teventobject.create fails with error 161

2016-10-14 Thread José Mejuto
El 14/10/2016 a las 20:11, Snorkl e escribió: Since I solved it by giving the name param a giud, the next thing to ask is why does teventobject fail kind of silently when the name parm is blank over time? Hello, To me it looks like a memory corruption, in your program or in the library.

Re: [fpc-pascal] Asci85

2016-09-16 Thread José Mejuto
El 16/09/2016 a las 10:16, Santiago A. escribió: Hello, StrmEnc85:=TAscii85EncoderStream.Create(StrmOut,72,True); try StrmEnc85.CopyFrom(StrmIn,0); Result:=StrmOut.DataString; finally StrmEnc85.Free; Maybe there is something wrong in ASCII85 encoder, but

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

2016-09-04 Thread José Mejuto
El 04/09/2016 a las 19:17, Marcos Douglas escribió: try Buf.LoadFromFile('data.txt'); showmessage(inttostr(ExtractStream(Buf, Buf2))); //<< result is 0, ie, OK Buf2.SaveToFile('result.txt'); There is no error, but Buf2 is empty. Hello, I'm not sure but I think that code at

Re: [fpc-pascal] TTestSuite

2016-09-02 Thread José Mejuto
El 02/09/2016 a las 15:24, Graeme Geldenhuys escribió: information will pollute the generated XML to stdout. Why not specify a output file for the generated XML, instead of letting it go to stdout. Run the FPCUnit console test application with the -h parameter to see what options are

Re: [fpc-pascal] TTestSuite

2016-09-02 Thread José Mejuto
El 02/09/2016 a las 14:39, Graeme Geldenhuys escribió: If the tests may show some kind of progress information I'm assuming you are talking about FPCUnit? If so, there is already a test progress listener implemented in the form of the TProgressWriter class (see the consoletestrunner.pas

[fpc-pascal] TTestSuite

2016-09-01 Thread José Mejuto
Hello, In the TTestSuite class when process is finished a XML is written to stdout. If the tests may show some kind of progress information, for manually run tests, this information must be in stdout, stderr, is there a specific method available for progress output ? Cheers, José

Re: [fpc-pascal] String concatenation failure (again)

2016-08-02 Thread José Mejuto
El 02/08/2016 a las 16:51, Jürgen Hestermann escribió: I would expect that with the new string encoding handling widestring will be converted automatically to "MyStringType" (which is string in my case). This assumption is encouraged by the fact that "Liste" is shown with the correct list of

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread José Mejuto
El 22/06/2016 a las 15:01, Mattias Gaertner escribió: I don't doubt that it is swapping. I would like to know why it is swapping. Is it avoiding hotspots, or for longevity, or turbo boost, or system processes, or security, or Related: What is the downside of pinning the process to a cpu?

Re: [fpc-pascal] Need help with a backtrace from fpc 2.6.4

2016-06-17 Thread José Mejuto
El 17/06/2016 a las 13:18, Dimitrios Chr. Ioannidis escribió: Hello, This looks completly wrong: #3 0x0053bf1f in TIDENTITYHEADERINFO__PROCESSHEADERS ( this=) at C:/Users/dimitris/Programming/Projects/R_1.2.4/3rdparty/indy/Pro tocols/IdHTTPHeaderInfo.pas:452 LSECS =

Re: [fpc-pascal] Incompatible types: got "SYSTEM.PChar" expected "SYSTEM.PChar"

2016-06-09 Thread José Mejuto
El 09/06/2016 a las 8:04, Sven Barth escribió: {$DEFINE THISDONTCOMPILE} TConstRecord: TFirstRecord = ( {$IFDEF THISDONTCOMPILE} Ident: TSomePcharArray[1] {$ELSE} Ident: @TSomePcharArray[1] {$ENDIF} ); One can only use untyped constants to initialize other constants or

[fpc-pascal] Incompatible types: got "SYSTEM.PChar" expected "SYSTEM.PChar"

2016-06-08 Thread José Mejuto
Hello, I have a lot of constant strings and some array of records that should be initialized in one field with one of this entries, so I found two solutions, one is create a symbol for each string, something like: const TMyStringSymbol='String one'; But also I need to be able to enumerate

Re: [fpc-pascal] fcl-pdf: Extracting a page...

2016-04-11 Thread José Mejuto
El 11/04/2016 a las 22:52, Marcos Douglas escribió: On Mon, Apr 11, 2016 at 5:45 PM, Graeme Geldenhuys wrote: I'm sure it is possible - there are PDF-to-Text tools around. Is it possible with the current fcl-pdf code? No. The fcl-pdf was designed to work the

Re: [fpc-pascal] How to compile Lazarus program using only FPC?

2015-10-03 Thread José Mejuto
El 03/10/2015 a las 20:24, Bo Berglund escribió: Is there some way one can reset all unused sectors on the disk to only contain 0xFF or Ox00? That would make the image file compressible to a few GB and possible to share. Hello, Just two links:

Re: [fpc-pascal] Assembler output

2015-09-12 Thread José Mejuto
El 12/09/2015 a las 14:10, Karoly Balogh (Charlie/SGR) escribió: There are two motivations, the first one is to learn how to do it manually, take a .pas, get the .s and assemble them (and link) to geta final executable. IIRC it was arguments: -a -st This won't assemble or link the executable,

Re: [fpc-pascal] Assembler output

2015-09-11 Thread José Mejuto
El 11/09/2015 a las 20:18, Florian Klämpfl escribió: FPC dependents on a lot of tools like cross binutils which are not provided by FPC itself. So install nasm separately. Hello, Thank you, so the presence of nasm should make the compiler finish the compilation ? I was thinking that to

Re: [fpc-pascal] Assembler output

2015-09-11 Thread José Mejuto
El 11/09/2015 a las 21:18, Sven Barth escribió: What is the reason you're trying to do this? Maybe we can help you a bit more if we know your motivation to pursue this. Hello, There are two motivations, the first one is to learn how to do it manually, take a .pas, get the .s and assemble

[fpc-pascal] Assembler output

2015-09-11 Thread José Mejuto
Hello, Can anybody enlight me in how to: - Compile a program outputting assembler in intel format. - Assemble the .s files in a final .exe I can get assembler in AT format using "-a" but if I add "-Anasmwin32" the program is not compiled as "nasm is not found", only main.lpr is compiled,

Re: [fpc-pascal] [Windows] FileGetAttr reports faHidden on e.g. C:\

2015-03-05 Thread José Mejuto
El 04/03/2015 a las 16:01, Bart escribió: Hi, Kind of off-topic. While working on Lazarus' TShellTreeView component, it was brought to my attention that FileGetAttr('C:\') returns an attribute that has faHidden in it. This is kind of unexpected. Well actually it reports $16: faDirectory +

Re: [fpc-pascal] 512bit (or higher) file encryption

2014-10-11 Thread José Mejuto
El 11/10/2014 a las #4, Krzysztof escribió: Hi, Need to encrypt file with 512bit (or higher) key. Looking at DCPCrypt but seems that none of them can do that. Any advice? Hello, Which is the reason for such a big symmetric key size ? -- ___

Re: [fpc-pascal] Is TFPList thread safe?

2014-10-03 Thread José Mejuto
El 03/10/2014 a las #4, Xiangrong Fang escribió: I don't intend to do any optimization. I just think that I need to enter a critical section, add item to the list, then leave the critical section. Hello, You must protect with a CriticalSection, Add and any other kind of access, like

Re: [fpc-pascal] Reproducible code: DLL calling Firebird crashes

2014-09-29 Thread José Mejuto
El 29/09/2014 a las #4, Reinier Olislagers escribió: What I would like to know what is the cause of this problem - dlls being loaded before some kind - what kind? - of initialization is complete? Anyway, I'll keep digging; probably first looking at geting postgresql support in anyway.

Re: [fpc-pascal] Imagemagick: magickwand doesn't convert to TIFF 1 bit

2014-09-14 Thread José Mejuto
El 13/09/2014 17:34, Reinier Olislagers escribió: (Earlier posted on forum) See subject - I've posted this on stackoverflow http://stackoverflow.com/questions/25719495/magickwand-conversion-to-tiffccitt-group-4-compression-gives-uncompressed-image Link to example program + demo image is

Re: [fpc-pascal] JS: \u00C1 = Á; Pascal: $00C1 = ?

2014-07-23 Thread José Mejuto
El 24/07/2014 2:12, silvioprog escribió: In JavaScript, if I code: alert('\u00C1'); It shows: Á Is \u00C1 of JS same to $00C1 in Pascal? Hello, \u means Unicode char, so \u00c1 = #$00C1 (widestring) -- ___ fpc-pascal maillist -

[fpc-pascal] typelib.pas

2014-06-26 Thread José Mejuto
review and apply the patch in the bug report noted above. Best regards, José Mejuto -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] paszlib problem: integer overflow

2013-11-14 Thread José Mejuto
El 14/11/2013 18:15, Dennis Poon escribió: I'd love to just use the paszlib in Lazarus/fpc but I also need the same unit for Delphi 5 (Dephi 5 program will compress data and send to linux /lazarus/fpc program ) so both sides need to understand the same compress/decompress protocol. I tried

Re: [fpc-pascal] math round vs banker's round

2013-08-13 Thread José Mejuto
El 13/08/2013 23:47, David Emerson escribió: Hi all, I have just discovered that the system.round function has this very odd behavior of rounding towards an even number when the fractional part is .5 -- in the system.round documentation this is described as banker's rounding I do not like this

Re: [fpc-pascal] FPC 2.6.2 throws SEGV in fpc_AnsiStr_Decr_Ref(). How is this possible?

2013-05-09 Thread José Mejuto
El 09/05/2013 5:19, Bruce Tulloch escribió: If there is no other explanation, then it means I need to find out how the string variable referred to by (%eax) could have been been accessed (or even known to exist) by any other thread in the same address space.-- Hello, In the past I had

Re: [fpc-pascal] Same code from LCL project throw error in console application

2013-04-17 Thread José Mejuto
El 16/04/2013 22:46, Krzysztof escribió: Thanks! exInvalidOp exception mask solved problem. But I don't understand. Same error I had in fpGUI project. fpGUI interface doesn't use GTK, QT etc, it drawing over pure X11 so how it is possible that application catch GTK errors? Hello, Almost any

Re: [fpc-pascal] Same code from LCL project throw error in console application

2013-04-16 Thread José Mejuto
El 16/04/2013 21:23, Krzysztof escribió: Hi, I have strange issue. Simple mpg123 player which work fine on LCL project, on console application throw floating error in line mh_e := mpg123_read(mh, @outbuf[0], buffer_size, done); Hello, I'm not sure but I think that the GTK2 Widgetset disables

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

2013-03-28 Thread José Mejuto
El 28/03/2013 1:06, Ewald 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/TDecompressionStream (no gzip format) or TGZFileStream (not able to work

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

2013-03-27 Thread José Mejuto
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/TDecompressionStream (no gzip format) or TGZFileStream

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-07 Thread José Mejuto
El 07/03/2013 12:29, Joao Morais escribió: Hello list, what's the problem with RoundThree procedure (below)? Here it raises a sigsegv trying to read an internal field. The difference from RoundTwo is that I create an implementation of the interface within the first param of tinterfacedlist.add

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 10:40, Jonas Maebe escribió: FPC 2.6.2 does give a warning (code is from http://bugs.freepascal.org/view.php?id=20907#c55064 ): [...] It could also fail in 2.6.x, just less often. Hello, 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0,

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 13:47, Jonas Maebe escribió: 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not have 2.6.2 to test): That's because you are passing an uninitialized value to a var-parameter. That only generates

Re: [fpc-pascal] Result: string

2013-03-06 Thread José Mejuto
El 06/03/2013 13:47, Jonas Maebe escribió: 2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not have 2.6.2 to test): That's because you are passing an uninitialized value to a var-parameter. That only generates

Re: [fpc-pascal] Result: string

2013-03-05 Thread José Mejuto
El 05/03/2013 11:23, Howard Page-Clark escribió: The code that makes me wonder something is wrong is this one: [...] For me (win32, FPC 2.6.2) the output is identical (= A) whether or not Result in TheA() is initialised manually or not. Perhaps 2.7.1 has a regression here if it differs for

[fpc-pascal] Result: string

2013-03-04 Thread José Mejuto
Hello, What's the expected output of this code ? function TheA(): string; begin Result:=Result+'A'; end; writeln(TheA()); I thought that when the result type is an automated one its value gets initialized... Maybe I'm wrong... -- ___

Re: [fpc-pascal] Result: string

2013-03-04 Thread José Mejuto
El 04/03/2013 22:16, Michael Van Canneyt escribió: That report says the issue was assigned to Jonas and fixed in revision 20427 (ver 2.6.1). I find the current release (2.6.2) initialises a string function result to EmptyStr as you would hope. [...] Prints AA Hello, I'm asking because

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread José Mejuto
El 12/02/2013 13:29, Giuliano Colla escribió: My conclusion is that one can't properly handle INI files with just a try..finally construct, as all examples show, because a possible error will propagate outside the construct, with unpredictable effects (in this case the FormClose procedure

  1   2   3   >