Re: [fpc-pascal] spin_lock

2006-05-29 Thread Marco van de Voort
[ Charset ISO-8859-15 unsupported, converting... ] > Am Dienstag, 30. Mai 2006 01:05 schrieb Alain Michaud: > > Hi, > > > > would someone know how to execute: spin_lock spin_lock_init and > > spin_unlock > > > > I just want to disable the interrupts for 200 miliseconds maximum! > > This is not too

Re: [fpc-pascal] real to integer

2006-05-29 Thread Vincent Snijders
Tony Pelton schreef: On 5/29/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: Use a IDE with code tools that support find declaration. that is a terrible answer. this isn't the "IDE" list, it is the Free Pascal "compiler" list. Indeed. But sometimes the compiler doesn't give enough informa

Re: [fpc-pascal] spin_lock

2006-05-29 Thread Burkhard Carstens
Am Dienstag, 30. Mai 2006 01:05 schrieb Alain Michaud: > Hi, > > would someone know how to execute: spin_lock spin_lock_init and > spin_unlock > > I just want to disable the interrupts for 200 miliseconds maximum! > This is not too long and hopefuly, my system will not crash... Well, 200 ms is abo

Re: [fpc-pascal] real to integer

2006-05-29 Thread Tony Pelton
On 5/29/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: Use a IDE with code tools that support find declaration. that is a terrible answer. this isn't the "IDE" list, it is the Free Pascal "compiler" list. i would have beat my head against a wall for days on a problem like that. i would sug

[fpc-pascal] spin_lock

2006-05-29 Thread Alain Michaud
Hi, would someone know how to execute: spin_lock spin_lock_init and spin_unlock I just want to disable the interrupts for 200 miliseconds maximum! This is not too long and hopefuly, my system will not crash... Does someone has any experience with this kind of situation. Sincerely Alain Mic

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Marc Santhoff
Am Montag, den 29.05.2006, 23:30 +0200 schrieb Burkhard Carstens: > Am Montag, 29. Mai 2006 22:47 schrieb Marc Santhoff: > > Hi, > > > > on FreeBSD I use fpOpen, fpIoctl, etc. to drive some generic device. > > In my porting efforts to win32 I have found the more generic > > FileOpen, but no equival

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Felipe Monteiro de Carvalho
On 5/29/06, Alain Michaud <[EMAIL PROTECTED]> wrote: I wanted to write a unit that would simulate this file (ioctl.h), but, this header file contains mainly macros. I do not think that it is possible to write some Pascal code that would in fact be a macro! If someone knows if it possible to write

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Micha Nelissen
Alain Michaud wrote: > In the mean time, I calculate the function number "by hand", knowing the > device number, function number, IO_RW, etc... Or if I use a precedure do > do this, then this will slow the program down. AFAIK, these numbers are mostly constants, so you need to do this work only on

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Burkhard Carstens
Am Montag, 29. Mai 2006 22:47 schrieb Marc Santhoff: > Hi, > > on FreeBSD I use fpOpen, fpIoctl, etc. to drive some generic device. > In my porting efforts to win32 I have found the more generic > FileOpen, but no equivalent of fpIoctl or it's underlying unix system > call ioctl(). > > An old win32

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Jonas Maebe
On 29 May 2006, at 23:09, Alain Michaud wrote: In the mean time, I calculate the function number "by hand", knowing the device number, function number, IO_RW, etc... Or if I use a precedure do do this, then this will slow the program down. It should be no problem to use (inline or not)fun

Re: [fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Alain Michaud
Hi, I use FpIOctl from "BaseUnix" . My platform is Linux. I do FpOpen then FpIOCTL. It works! However: The kernel 2.6 has a new naming convention for the function number. See the file: asm/ioctl.h This file contains many constants and the final call number is assembled from the direction type,

[fpc-pascal] porting fpIoctl() to windows

2006-05-29 Thread Marc Santhoff
Hi, on FreeBSD I use fpOpen, fpIoctl, etc. to drive some generic device. In my porting efforts to win32 I have found the more generic FileOpen, but no equivalent of fpIoctl or it's underlying unix system call ioctl(). An old win32.hlp told me Windows has "DeviceIoCtl()", but I'm not really sure i

Re[2]: [fpc-pascal] real to integer

2006-05-29 Thread Пётр Косаревский
> > While compiler gives a hint about "true" declaration, it does not point to > > the problematic unit. > Use a IDE with code tools that support find declaration. > In your case Lazarus would for example have jumped to an include file that > that > contains the wrong declaration. Search include

Re: [fpc-pascal] real to integer

2006-05-29 Thread Vincent Snijders
Пётр Косаревский schreef: The problem is that Apple's universal interfaces also include a "round" function, which returns a real instead of an integral type. How can one find such a thing himself without trial&error? Some time ago I had a similar problem with "bool DeleteFile(PChar)" functi

Re[2]: [fpc-pascal] real to integer

2006-05-29 Thread Пётр Косаревский
> The problem is that Apple's universal interfaces also include a > "round" function, which returns a real instead of an integral type. How can one find such a thing himself without trial&error? Some time ago I had a similar problem with "bool DeleteFile(PChar)" function in Windows API and s

Re: [fpc-pascal] real to integer

2006-05-29 Thread Jonas Maebe
On 29 mei 2006, at 14:46, Thomas Miller wrote: I am frustrated by a very simple problem. I am trying to convert real to integer, using free pascal for mac. I am an old Think Pascal user who just recently found free pascal and, while thrilled to have a pascal compiler for mac OSX, I am s

Re: [fpc-pascal] real to integer

2006-05-29 Thread Vincent Snijders
Thomas Miller schreef: I am frustrated by a very simple problem. I am trying to convert real to integer, using free pascal for mac. I am an old Think Pascal user who just recently found free pascal and, while thrilled to have a pascal compiler for mac OSX, I am still a bit lost. In Think Pa

[fpc-pascal] fpc for ARM on FreeBSD

2006-05-29 Thread Marc Santhoff
Hi, since I know fpc has a code generator for ARM CPUs and is running on FreeBSD I'd like to know: What would be needed to make the compiled programm run on FreeBSD for ARM? If there is some real porting work to do (as an opposite of "re-configuration"), how much time may that take? The FreeBSD

[fpc-pascal] real to integer

2006-05-29 Thread Thomas Miller
I am frustrated by a very simple problem. I am trying to convert real to integer, using free pascal for mac. I am an old Think Pascal user who just recently found free pascal and, while thrilled to have a pascal compiler for mac OSX, I am still a bit lost. In Think Pascal, I would have