Re: [fpc-pascal] MySQL

2009-10-16 Thread Paul Davidson
dsl-corax:~ pauldavidson$ lipo -info /Users/pauldavidson/dev/cape96/ 
libmysqlclient.a
input file /Users/pauldavidson/dev/cape96/libmysqlclient.a is not a  
fat file
Non-fat file: /Users/pauldavidson/dev/cape96/libmysqlclient.a is  
architecture: x86_64



Noted that Xcode is set for 32 bit universal output.  Tried setting it  
to 10.6 / 64 bit output but:


 can't build libfpc.a for x86_64 (ppcx64 not found)
mv: rename /Users/pauldavidson/dev/cape96/build/cape96.build/Debug/ 
fpc.build/libfpc.a to /Users/pauldavidson/dev/cape96/build/Debug/ 
libfpc.a: No such file or directory



Thank you

Off topic:  Friend of mine :)  
http://wheresthefilm.com/Insects/Beetles/slides/StackBeetle02.html



It means that the library contains code for different architectures  
than the one you are compiling for (e.g., you are compiling for i386  
and the library only contains PowerPC or x86_64 object files). That  
would indeed explain the problem.


You can run
 lipo -info /Users/pauldavidson/dev/cape96/libmysqlclient.a

to see for which architectures the library contains code.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MySQL

2009-10-16 Thread Paul Davidson

Ok, 32 bit universal it is!

Is there any database access method that works with this mode for  
10.6.1?  And how?


Again, thank you



On 2009-10-16, at 8:59 AM, Jonas Maebe wrote:



On 16 Oct 2009, at 14:51, Vincent Snijders wrote:


Jonas Maebe schreef:
That's correct, FPC 2.2.4 only support i386 and PowerPC for Mac OS  
X. The upcoming 2.4.0 release will also support x86_64, PowerPC/64  
and ARM.


As far as I could see, there are no x86_64 Mac OS X snapshots. Is  
that correct?


Yes. There aren't any PPC64 or (regular) ARM ones either. Both  
x86_64 and PPC64 will also only be useful for command line programs,  
because MacOSAll haven't been adapted for 64 bit yet (and a lot of  
its functionality is not available in 64 bit mode).



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] MySQL

2009-10-16 Thread Paul Davidson

Now have proper version of MySQL on machine


Thank you all for help.  Compiles and mostly runs :)


On 2009-10-16, at 9:21 AM, Jonas Maebe wrote:



On 16 Oct 2009, at 15:12, Paul Davidson wrote:


Ok, 32 bit universal it is!

Is there any database access method that works with this mode for  
10.6.1?  And how?


Since MySQL is not shipped with Mac OS X, you somehow installed/ 
obtained an x86_64 version of its client library. Install/obtain a  
ppc/i386 version of the client library, and you can link 32 bit  
programs against it. Mac OS X 10.5/10.6 running on an x86_64-capable  
cpu can run i386, x86_64 and ppc binaries (the last ones under  
emulation, the rest natively).



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-16 Thread Paul Davidson
If memory serves...  Microsoft for first few version of DOS used  
assembler.  This proved expensive for Microsoft as the number of  
people willing to program in intel assembler was quite limited.   
Microsoft kept hearing about this C programming language which  
students at MS were talking about.  It was essentially free and the  
number of people willing to program was high, and their cost (because  
they were students) was low.  Microsoft converted to C.


The reasons that C was popular was quite simple.  It was free to  
universities and colleges so professors did not have to pay compiler  
licenses to IBM, Xerox, Control Data, etc.  This made it quite popular  
with faculty.  C requires little or no discipline to program in.  So  
the typical zit faced 18 year old socially outcast student loved it as  
well.  The perfect eco-system :)


So like many things that originate from US (but not all) it was the  
law of the cheapest solution.  So today we have C, C++, and Java (a  
toilet trained version of C++) to use.


/Step_off_soap_box


On 2009-10-16, at 12:58 PM, Jürgen Hestermann wrote:

You can post an ad for a C programmer and get 1,000 applicants, if  
you post an ad for a Pascal programmer you might get 5, at least  
where I live.


Yes, that maybe true. But how has all this started? As far as I  
know, C was not that popular in past (at least not on Windows).  
Instead (Turbo) Pascal was a widely used language. Suddenly this  
turned. May have come from Linux, where C was standard. I don't know.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] More OS X problems

2009-10-15 Thread Paul Davidson

Thank you

Changing the mode in the project fixed all problems.  System now  
compiles correctly.


pd


On 2009-10-13, at 4:14 PM, Jonas Maebe wrote:


Paul Davidson wrote on Tue, 13 Oct 2009:


OS X 10.6.1  FPC 2.2.4  Xcode 3.2 (64 bit)

Using code base that has complied correctly since 2004

Fixed $MODE OBJFPC


What exactly did you fix and how? Marco mentioned something about  
duplicate mode switches, but if you want help you really have to be  
more specific.


1)  A unit with identical first few lines as several other  
successfully compiled units gives a 'Identifier not found class  
error.  Following is start of file:


{
 tccStack.pas
 corax60
 Created by Paul Davidson on 2005/01/01.
 Copyright (c) 2005 Corax Networks.Inc.. All rights reserved.
}
unit cStack;
 {$I Directives.inc}
interface
uses
 SysUtils;
 type
   tccStack = class( TObject )   {Barfs here}


It means that the file is not being compiled in Delphi or ObjFPC  
mode. What happens if you add {$mode objfpc} before the {$i  
Directives.inc} statement? Does the compiler then complain about an  
illegal/duplicate mode switch? What are the contents of that  
Directives.inc file?


Note that the default compilation mode for the Xcode projects is  
MacPas mode (set via the command line options; see the FPC Xcode  
ReadMe.rtf on the installer disk image for information about where  
you can see and change these parameters), so if you don't add any  
{$mode xxx} statement, that's what your code will use.


2) All .s files give a Command /Developer/usr/bin/gcc-4.2 failed  
with exit code 1


How did you create the project? Did you use a template included with  
FPC 2.2.4? (if so, which one) Are the errors for units that are  
actually used by your main program? If not, have you tried following  
the these instructions from the FPC Xcode ReadMe.rtf file on the  
installer disk image under point 6. Troubleshooting and FAQs:


***
1) Q: What can I do when getting the following error after building:

powerpc-apple-darwin8-gcc-4.0.1: warning: '-x assembler-with-cpp'  
after last input file has no effect

powerpc-apple-darwin8-gcc-4.0.1: no input files
powerpc-apple-darwin8-gcc-4.0 failed with exit code 1

• A: Short answer: click on the disclosure triangle next to the  
Targets group, then next to the target with the same name as your  
project, and then next to its Compile Sources phase. Remove any  
sources from that phase which are not actually used by your program.


Long answer: the projects work in two phases. First, FPC is used to  
compile all sources from Pascal to assembler code. Next, Xcode calls  
gcc to assemble the resulting files, links them together and builds  
the application bundle (Xcode refuses to link if we let FPC directly  
generates object code). If you remove a unit from the uses clause of  
your program, FPC will no longer compile this unit. Subsequently,  
there will be no assembler code for gcc to assemble, and Xcode will  
pass an empty filename to gcc, causing the error displayed above.

***


Jonas


This message was sent using IMP, the Internet Messaging Program.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] MySQL

2009-10-15 Thread Paul Davidson

FPC 2.2.4
OS X 10.6.1
Xcode 3.2

All references to MySQL function are unresolved by linker.
libMySQLclient.a is copied to .pas directory.  Using FPC test code for  
MySQL as template.


Any hints please?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] MySQL

2009-10-15 Thread Paul Davidson
Added libmysqlclient.a to the project and it gets automatically  
included in Tagets/cape96/Link Binary With Libraries.  Again same  
linker errors: Symbols not found.  Also tried libmysqlclient.la.  Same  
result.


When looking at examples and tests in FPC for MySQL they do not  
contain any references to this library.


Any further hints?

Thank you


On 2009-10-15, at 7:13 AM, Jonas Maebe wrote:



On 14 Oct 2009, at 18:14, Paul Davidson wrote:


FPC 2.2.4
OS X 10.6.1
Xcode 3.2

All references to MySQL function are unresolved by linker.
libMySQLclient.a is copied to .pas directory.  Using FPC test code  
for MySQL as template.


When you use Xcode, you have to use the Xcode way to link with  
libraries: add the library to your project, then add the library to  
the Link binary with Libraries phase of your application target.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] MySQL

2009-10-15 Thread Paul Davidson

Here is the head of the unit:

{
  cMySQL.pas
  cape61
  Created by Paul Davidson on 2005/01/18.
  Copyright (c) 2005 Corax Networks.Inc.. All rights reserved.
}
unit cMySQL;
  {$I Directives.inc}
interface
{$linklib libmysqlclient.a}
  uses
cBase,
cKey,
cStack,
mysql4;

Using MySQL 41

Some linker output:
ld: warning: in /Users/pauldavidson/dev/cape96/libmysqlclient.a, file  
is not of required architecture

Undefined symbols:
  _mysql_get_host_info, referenced from:
  _CMYSQL_TCCMYSQLMGR_$__GETHOSTINFO$$ANSISTRING in cMySQL.o
  _mysql_free_result, referenced from:
  _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in  
cMySQL.o

  _mysql_close, referenced from:
  _CMYSQL_TCCMYSQLMGR_$__DESTROY in cMySQL.o
  _mysql_error, referenced from:
  _CMYSQL_TCCMYSQLMGR_$__REALCONNECT$$BOOLEAN in cMySQL.o
  _CMYSQL_TCCMYSQLMGR_$__QUERYBATCH$ANSISTRING$$ANSISTRING in  
cMySQL.o
  _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in  
cMySQL.o

  _mysql_store_result, referenced from:
  _CMYSQL_TCCMYSQLMGR_$__QUERYLOCAL$ANSISTRING$$ANSISTRING in  
cMySQL.o


It goes on...
Do note the 'file is not of required architecture'.  Ummm


Thank you


On 2009-10-15, at 10:27 AM, Jonas Maebe wrote:



On 15 Oct 2009, at 16:03, Paul Davidson wrote:


On 2009-10-15, at 7:13 AM, Jonas Maebe wrote:


On 14 Oct 2009, at 18:14, Paul Davidson wrote:


FPC 2.2.4
OS X 10.6.1
Xcode 3.2

All references to MySQL function are unresolved by linker.
libMySQLclient.a is copied to .pas directory.  Using FPC test  
code for MySQL as template.


When you use Xcode, you have to use the Xcode way to link with  
libraries: add the library to your project, then add the library  
to the Link binary with Libraries phase of your application  
target.


Added libmysqlclient.a to the project and it gets automatically  
included in Tagets/cape96/Link Binary With Libraries.  Again same  
linker errors: Symbols not found.  Also tried libmysqlclient.la.   
Same result.


When looking at examples and tests in FPC for MySQL they do not  
contain any references to this library.


When you compile outside Xcode, any {$linklib xxx} statements in the  
(mysql or other) units you use will automatically cause the compiler  
to tell the linker to link with the specified libraries. So if those  
units already include {$linklib mysqlclient}, it's not required to  
explicitly also tell the program to link against it. This changes if  
you move to Xcode, because Xcode itself does all the linking and  
there is no way (that I know of) for the compiler to tell it please  
also link against these libraries in addition to those specified in  
the project.


But you are leaving out important information, such as which mysql  
unit you are using exactly and which version the libmysqlclient.a  
comes from. Most examples use the dynamic versions of the mysql  
units, which means that the mysqlclient library is dynamically  
loaded at run time rather than statically linked (in which case no  
linklib statement or other linker instructions are required). Please  
also mention some example symbols that are reported as being  
missing, and post the linker step of the Xcode build transcript  
(select the error on the build transcript and right-click on to see  
the full tool invocation/output).



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] More OS X problems

2009-10-13 Thread Paul Davidson

OS X 10.6.1  FPC 2.2.4  Xcode 3.2 (64 bit)

Using code base that has complied correctly since 2004

Fixed $MODE OBJFPC

Current problems

1)  A unit with identical first few lines as several other  
successfully compiled units gives a 'Identifier not found class  
error.  Following is start of file:


{
  tccStack.pas
  corax60
  Created by Paul Davidson on 2005/01/01.
  Copyright (c) 2005 Corax Networks.Inc.. All rights reserved.
}
unit cStack;
  {$I Directives.inc}
interface
uses
  SysUtils;
  type
tccStack = class( TObject )   {Barfs here}


2) All .s files give a Command /Developer/usr/bin/gcc-4.2 failed with  
exit code 1


Any suggestions?


Thank you

P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Mac OS X 10.6.1 problem

2009-10-12 Thread Paul Davidson

Using OS X 10.6.1, FPC 2.2.4, Xcode 3.2 on intel iMac.

The program and units all have {$I Directives.inc} at top of each  
file.  Compile lists many errors like:


6: Mode switch OBJFPC not allowed here

Any hints?






___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] google summer of code?

2006-04-27 Thread Paul Davidson

Speculation and rumor are more fun

On Apr 27, 2006, at 15:44, Marc Santhoff wrote:


Am Donnerstag, den 27.04.2006, 14:22 -0300 schrieb John Coppens:

On Thu, 27 Apr 2006 13:20:39 -0300
Flávio Etrusco [EMAIL PROTECTED] wrote:


Or because opensource world tends to be C-centric, or because FPC
didn't make to the news a lot in USA, or because... we could go  
on for

some time.


This is beginning to show some similarities to the DMOZ (Google's  
open
directory project) where several scandals surfaced along the way.  
Sites

were turned down without motivation, and monitors (called editors
there) were chosen at the whim of supervisors.


Why not simply ask for the reason of rejection before speculations go
wild?

Marc

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Object pascal a Modern Language

2006-03-03 Thread Paul Davidson

Mild Pascal rant:

Thank you for considering Pascal.  Contrary to popular belief, Pascal 
is indeed a modern language.  Though developed some time ago it has 
evolved the to include most of the extensions seen in 'modern' 
languages.  It should be noted that modern is not synonymous with 
recently invented.


Pascal is fully OO.  Many would say the implementation of OO is better 
and more complete than C++.  Performance is on par with C and C++.  Any 
differences usually related to automatic and predictable garbage 
collection present in Pascal.  Accessing C libraries is also simple.


Coming from a long background in large scale application design and 
management, Pascal has other advantages.  The syntax is somewhat simple 
than C and Java.  As well, experience and studies have shown that the 
same skill and effort applied to a C and Pascal project usually results 
in about 50% less productions bugs in the Pascal code.


FPC specifically has more advantages.  First is the active (and 
somewhat rabid:) development community.  It is centered in Europe, 
where the 'language du jour' does not hold as much sway as it does in 
North America.  Also, there is a large collection of libraries, tools 
and utilities available.


FPC handles many different flavours of the language.  It is portable 
(as is Lazarus) over many operating systems and processor types.  It is 
far more portable than Java and .Net (for different reasons)!


A thought-out design of your application can be as fast and portable as 
you wish.


Thank you for considering FPC and good luck with your project.

/RANT

On Mar 3, 2006, at 12:01, Matt Henley wrote:


I belong to a mailing list for a defunt open source chemical process
simulator (Sim42).  Members of the list are now showing interest in
restarting the effort.  It was originally written in python which
cause some speed issues.  Several of the list members (including me)
suggested freepascal and lazarus.  The gentleman spearheading the
effort sent the following and I would like to know what is the best
way to respond.  I do not know what features define a modern
language and would like to know what points to bring up.

My personal objective is not just to put out a simulator, but a fast
and efficient simulator.  Furthermore, personally, I do not consider a
program portable if it is written in a language which very few can
understand.  A modern language such as any of the .NET languages will
meet the efficiency objective but portability remains an issue.  While
I do have the Visual Studio .NET and I am happy with it, I understand
that not everybody has it and it is not cheap.  I looked at the
Lazarus project and (at least at a first glance) it is indeed very
Visual and will likely do the job.  It will however, limit us to
Pascal which is not really a modern language.  For those of you who
are in favor of using Lazarus, can you assure the rest of us that
Pascal has been modernized? 

Thanks for any help
Matt Henley
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] astring.pas

2005-12-16 Thread Paul Davidson

Darwin 2.1.1 today
astrings.inc(88,1) Fatal: Syntax error, BEGIN expected but shl found
astrings.inc(88,1) Fatal: Compilation aborted

P Davidson
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] ppas.sh

2005-12-13 Thread Paul Davidson

Trying to compile app.
Free Pascal Compiler version 2.0.2 [2005/11/15] for powerpc
Mac OS X 10.3

Compilation end with:
Closing script build/cape90.build/cape90.build/ppas.sh
263 Lines compiled, 0.8 sec

Any hints?

P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ppas.sh

2005-12-13 Thread Paul Davidson

Problem solved.
Turned out to be corrupt project file(s).  i.e. app.1 or app.xcode.
Created new project, copied over source.  Joy.

On Dec 13, 2005, at 15:04, Vincent Snijders wrote:


Paul Davidson wrote:

Trying to compile app.
Free Pascal Compiler version 2.0.2 [2005/11/15] for powerpc
Mac OS X 10.3
Compilation end with:
Closing script build/cape90.build/cape90.build/ppas.sh
263 Lines compiled, 0.8 sec


What is wrong with that? What command line parameters did you use?

Vincent
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] db2 connection component

2005-12-03 Thread Paul Davidson

Mr. Bee, let me know if one turns up!
Thanks

On Dec 3, 2005, at 8:13, Bisma Jayadi wrote:


Dear all,

I'm currently trying to convert a Delphi database application which 
access an IBM DB2 database server through dbExpress component, onto 
Lazarus (FPC). I think the TxxxConnection database connection 
components have similar concept with dbExpress technology.


But, the problem is I can't find TDB2Connection component. I've search 
the net for similar solutions, but I got no luck. Since I know nothing 
about low-level-database-driver-access, I need a ready-to-use 
component. I've tried ZeosDB object, but it has tons of bugs in the 
DB2 connection class (thouhg it pretty stable for mySQL and Firebird), 
so I think it's not ready for a stable/reliable application.


So, is there anyone here has any URLs, refferences, custom components, 
or anything which able to solve my problem? I'd really appreciate it.


For any kind of helps, I thank you in advance.

-Bee-

has Bee.ography at
http://beeography.blogsome.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Download file

2005-11-17 Thread Paul Davidson
The silly answer.  Construct an HTTP message according to IETF/W3C 
rules.


Better answer.  Assuming you have a socket connection open, the 
following should be included

in your message:

HTTP/1.0 200crlf
Connection: Closecrlf
Content-length:number of byte in Content: below, as ASCII string
Content-type:text/ascii, or something similarcrlf
MIME-version:1.0crlf
crlf
content

The above should be in single string.
crlf means carriage return/line feed, or ASCII chars 10 and 13.
Content-type is important.  text/ASCII will work in most situations. 
Otherwise see MIME standards at http://www.ietf.org for more details.
Please note that is extra crlf after text headers.  This is to 
indicate that what follows is the data you want to transmit.


There are many other fields that can be added, depending on who is at 
other end of connection, but the ones above should work in most 
situation.  This is NOT ACID compliant.


See http://www.w3.org/Protocols/ for more details on HTTP.

On Nov 17, 2005, at 16:18, [EMAIL PROTECTED] wrote:


Question:
I would like to download a file via HTTP, how can I achieve that in a
platform independent way? What components to use and is there some code
suited for dummy's available.

Darius

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Download file

2005-11-17 Thread Paul Davidson

It does not work as is on Mac, but then, most people don't care.  *cry*

On Nov 17, 2005, at 18:42, L505 wrote:


Question:
I would like to download a file via HTTP, how can I achieve that in a


Synapse is nice..

Note: It is not 100 percent platform independent.

(works on Linux and Windows possibly other operating systems.)


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] CASE

2005-11-08 Thread Paul Davidson


On Nov 8, 2005, at 11:39, Eduardo wrote:


At 04:42 08/11/2005, you wrote:

May be having case statement problem.

App has case statement with 146 sequential labels.
They are in order, from a defined type.
The assembler output is scanning each label, where it seems a jump 
would be more efficient.


I don't understand well what you have:


Not this


case L3o3.Formtype of
1,2,3,,146 : begin somecode
end;
or



This :)


case L3o3.FormType of
1 : begin somecode1
 end
2 : begin somecode2
 end

and so on.

For the second case the assemmbler code seems ok to me, also L1051 
L1052 L1053 looks like are different destinations. For the first, 
well, it can be optimized a bit by hand, but note that it's 
difficult to do in automatic mode by a compiler.


lwz   r2,160(r1)// Load in r2 the value to compare
subi r3,r2,145  // Change 145 with the top value. Don't need 
to record in cr0, so subi is used instead of subi. (with point)
cmplwi cr3,r3,0 // Change 0 with the low value. So if 145-r2 
is greater or equal 0, it's between them or is one of them
bge  cr3,L1051  // branch to L1051. Use bge+ cr3,L1051 if you 
are sure that branch will be taken often


Note that cr3, is a condition register field and can be used by the 
compiler for other pourposes. This code only works with integer values 
0  r2  65535, perhaps also works with chars. If you know that the 
condition is true (r2 is between 0 and 145 often), you can use the '+' 
format of the branch.


The code may not work, i'm writing it by memory.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




Was under the impression that doing a jump, offset by label number, 
would be faster.  Specially for such long case statements.


P Davidson
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] CASE

2005-11-08 Thread Paul Davidson


Jump by offset label number? I don't understand it.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




Sorry Eduardo, am not knowledgeable of compiler internals.
There is (?) an optimization in FPC that uses a jump table(?) instead 
of scanning each label value of a case statement.  Hoping that this is 
the case, as it seems to be with i386.  This would mean faster 
execution of the case.  Yes?


P Davidson
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] CASE

2005-11-08 Thread Paul Davidson


On Nov 8, 2005, at 12:11, Peter Vreman wrote:



# [735] case l3o3.FormType of
 // Select 3o3 processor
lwz r2,160(r1)
cmplwi  cr0,r2,0
beq cr0,L1051
cmplwi  cr0,r2,1
beq cr0,L1052
cmplwi  cr0,r2,2
beq cr0,L1053
cmplwi  cr0,r2,3
beq cr0,L1054

etc.

Any hints?


Use 2.1.1


Peter

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




version 2.1.1 [2005/11/08] for powerpc
Same result, Peter :|

P Davidson
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] CASE

2005-11-07 Thread Paul Davidson

May be having case statement problem.

App has case statement with 146 sequential labels.
They are in order, from a defined type.
The assembler output is scanning each label, where it seems a jump 
would be more efficient.


ppc 32, Darwin
/usr/local/bin/ppcppc cape80.pas -Ci -Co -g -gl -O1 -vr -a -al 
-FEbuild/cape80.build/cape80.build -ocape80


Also tried -O2 and 3

Result:

# [735] case l3o3.FormType of   
 // Select 3o3 processor

lwz r2,160(r1)
cmplwi  cr0,r2,0
beq cr0,L1051
cmplwi  cr0,r2,1
beq cr0,L1052
cmplwi  cr0,r2,2
beq cr0,L1053
cmplwi  cr0,r2,3
beq cr0,L1054

etc.

Any hints?


P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Systems 2005: A first summary

2005-10-29 Thread Paul Davidson

One must start X-Windows from terminal, then start Lazarus.

You could also try this site.
All are .dmg files, friendly to Macs

Try http://www.ca.freepascal.org/Lazarus/
On Oct 29, 2005, at 16:11, Éric DÉTREZ wrote:



Le 29 oct. 05 à 21:22, Florian Klaempfl a écrit :


When we asked, did you try lazarus, the answer was, no, I didn't know 
about it.


So I try lazarus.
I download it (Lazarus, new fpc, fpcsrc (?))
But I don't find it anywhere.
No lazarus, even in the Terminal.
I'm a mac osx user.
Can anybody help a newbee ?

ÉrIc Détrez
Mathématiques  informatique (Faidherbe Lille)

Europe pas morte ?
http://www.sauvonsleurope.org/



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Threads

2005-10-28 Thread Paul Davidson
Would it be possible to add a property to TThreads to expose 
DefaultStackSize in rtl/inc/threadh.inc

Or something similar.

Working on app that uses lots of complex recursion.  Ran into problems 
and ended rewriting this component.  In order to meet stack size limit, 
program runs much slower.


Comments please?


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Threads

2005-10-28 Thread Paul Davidson


On Oct 28, 2005, at 9:12, Michael Van Canneyt wrote:




On Fri, 28 Oct 2005, Paul Davidson wrote:

Would it be possible to add a property to TThreads to expose 
DefaultStackSize in rtl/inc/threadh.inc

Or something similar.


It should be possible, yes, however this will require that the stack
size is added to the constructor: the constructor calls beginthread.


This makes sense.  Much as other thread properties are usually done in 
constructor as well.




But we'll need also to change the BeginThread call itself, because
it will need the stacksize as an (optional) parameter.

This can (and probably should) be done, but that will not make it in 
the




Working on app that uses lots of complex recursion.  Ran into 
problems and ended rewriting this component.  In order to meet stack 
size limit, program runs much slower.


Comments please?


For the time being, the easiest is to set the thread manager to your 
own

thread manager, and set the stack yourself in the BeginThread function.
However, this will create all threads with the same size.


In this case it is acceptable



Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Packages missing

2005-10-16 Thread Paul Davidson

Cannot compile using latest 2.1.1 or 2.0.1
MySQL, MySQL4 and NetDB are not found

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Packages missing

2005-10-16 Thread Paul Davidson

Cannot compile using latest 2.1.1 or 2.0.1
MySQL, MySQL4 and NetDB are not found


MySQL no longer exists, it's either MySQL4 or MySQL3, but they are 
distributed.

NetDB should normally always be distributed.

What platform are you using ?

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




Darwin.  Sorry about MySQL.  Using MySQL4 here


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Packages missing

2005-10-16 Thread Paul Davidson

UBF*

Sorry folks.  All is well.  Turned out to be fault of author of this 
mail.



*UBF - User brain failure

On Oct 16, 2005, at 13:55, Paul Davidson wrote:


Cannot compile using latest 2.1.1 or 2.0.1
MySQL, MySQL4 and NetDB are not found


MySQL no longer exists, it's either MySQL4 or MySQL3, but they are 
distributed.

NetDB should normally always be distributed.

What platform are you using ?

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




Darwin.  Sorry about MySQL.  Using MySQL4 here


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from 
disclosure under applicable law.  If the reader of this message is not 
the intended recipient, or the employee or agent responsible for 
delivering the message to the intended recipient, you are notified 
that any dissemination, distribution or copying of this communication 
is strictly prohibited.  If you have received this communication in 
error, please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Missing MySQL4?

2005-10-15 Thread Paul Davidson

Latest 2005/10/15 trunk seems to miss MySQL4 unit from packages.
Source is in rtl, but not compiled and / or installed

P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Various Darwin problems

2005-10-11 Thread Paul Davidson

Last couple update to fpc 2.1.1 for Darwin have been broken

Here are some symptom:

At times XCode debugger stops program/trace with SIGSEGV
TThread creation seems about 10 times faster.
Sleep( 1 ) does not sleep for one milli-second, more llike 0.
There may be inconsistent results with critical sections.

Will try to get more useful results soon.

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Various Darwin problems

2005-10-11 Thread Paul Davidson

Lets wait for debug to return before making any changes.
Will investigate further at that time

On Oct 11, 2005, at 7:46, Marco van de Voort wrote:


On 11 okt 2005, at 13:11, Paul Davidson wrote:

Don't know what changed here.


The sleep was changed from select to nanosleep. It seems OS X doesn't 
accept

sleeps smaller than 10ms. Maybe revert to select() for Mac OS X only?

(the select breaks Kylix compat on Linux)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Various Darwin problems

2005-10-11 Thread Paul Davidson

Tested some sleep and nano sleep functions.
They seems to work well, given the limits of Darwin OS.

Now tracking possible suspend/resume issues.

On Oct 11, 2005, at 8:35, Jonas Maebe wrote:



On 11 okt 2005, at 14:25, Felipe Monteiro de Carvalho wrote:


The sleep was changed from select to nanosleep. It seems OS X
doesn't accept
sleeps smaller than 10ms.


That is not true. This program takes half a second on my machine:


This only happens because you are getting a very big time period on
your test. Sleep, nanosleep and all other timing procedures are simply
*not* reliable when you want a microsecond or 1milisecond precision.
This kind of precision is achieved throught other means, such as
special device drivers, interruptions, real-mode, etc.


You're completely right they are not reliable. Also, you must always 
remember that nanosleep() can return before it has waited for the 
specified time (that's what the second parameter is for) because of 
delivery of a signal.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Various Darwin problems

2005-10-11 Thread Paul Davidson

Tests where with app that monitors to at least mS intervals.
Results are consistent with past runs.  Altering internal fixed delays
of +/- 1 mS reported acceptable results.


On Oct 11, 2005, at 8:44, Jonas Maebe wrote:



On 11 okt 2005, at 14:39, Paul Davidson wrote:


Tested some sleep and nano sleep functions.
They seems to work well, given the limits of Darwin OS.


Not sure what limits you mean. Darwin has one of the smallest 
scheduling latencies of all non-real time OS'es out there. Try running 
sudo latency -rt for a while.



Jonas

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Various Darwin problems

2005-10-11 Thread Paul Davidson

Modified program by creating threads resumed (not suspended),
then using new loop to start each one.

Though new loop completes, and threads are created (31 inclucing 
process),
they refuse to be terminated.  It seems that RESUME, at least from 
another thread, if faulty.


As well, CPU utilization is still near 100%

program TestResume;

{$mode objfpc}{$H+}

uses
  cThreads, BaseUnix, Unix, Classes;

const
  MAX = 30;

type
  TThr = class(TThread)
   protected
procedure Execute; override;
  end;

var
ti1 : timeval;
ti2 : timeval;
tiz : timezone;

procedure TThr.Execute;
var
  T1, T2: Ttimespec;
begin
  T1.tv_sec:=0;
  T1.tv_nsec:=1000;
  Suspend;
  while not Terminated do
FpNanoSleep(@T1, @T2);
end;

var
  a: array[1..MAX] of TThr;
  i: Integer;
  T1, T2: Ttimespec;
begin
  T1.tv_sec:=10;
  T1.tv_nsec:=0;

  // Set up time
  fpGetTimeOfDay( @ti1, @tiz );
  for i:=1 to MAX do
a[i]:=TThr.Create(TRUE);
  fpGetTimeOfDay( @ti2, @tiz );
  Writeln('Threads created in ',
   ( ( ( extended( ti2.tv_sec )   * 100 + ti2.tv_usec ) -
		   ( extended( ti1.tv_sec ) * 100 + ti1.tv_usec ) ) / 1000 ):7:3, 
'mS' );


  writeln( 'Waking threads' );
  fpGetTimeOfDay( @ti1, @tiz );
  for i:=1 to MAX do
a[i].Resume;
  fpGetTimeOfDay( @ti2, @tiz );
  Writeln('Threads woke in ',
   ( ( ( extended( ti2.tv_sec )   * 100 + ti2.tv_usec ) -
		   ( extended( ti1.tv_sec ) * 100 + ti1.tv_usec ) ) / 1000 ):7:3, 
'mS' );


  writeln( 'Waiting 10 seconds' );
  FpNanoSleep(@T1, @T2);

  Write('Freeing threads... ');
  fpGetTimeOfDay( @ti1, @tiz );
  for i:=1 to MAX do begin
a[i].Terminate;
a[i].WaitFor;
a[i].Free;
  end;
  fpGetTimeOfDay( @ti2, @tiz );
  Writeln('Threads destroyed in ',
   ( ( ( extended( ti2.tv_sec )   * 100 + ti2.tv_usec ) -
		   ( extended( ti1.tv_sec ) * 100 + ti1.tv_usec ) ) / 1000 
):10:3, 'mS' );

  Writeln('Done');
end.

On Oct 11, 2005, at 9:07, Marco van de Voort wrote:


doesn't accept
sleeps smaller than 10ms.


That is not true. This program takes half a second on my machine:


This only happens because you are getting a very big time period on
your test. Sleep, nanosleep and all other timing procedures are simply
*not* reliable when you want a microsecond or 1milisecond precision.


This is a general problem for preemptive OSes. I had problems with 
Darwin

beyond that, iow magnitudes more than expected.

In the demo below for high values (100ms) in the thread.execute sleep, 
threadshutdown

is swift (few hunderd ms). For short ones, it isn't (few sec).

P. Davidson came with the problem, Almindor with the test, and I could
duplicate the problem, but not explain it. Maybe the larger pauze 
avoids
shutting all 30 threads at once, and is _that_ (30 threads shutting 
down

at once) the problem.



P Davidson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] SO_RCVTIMEO

2005-09-14 Thread Paul Davidson
Trying to get SetSocketOptions for SO_RCVTIMEO and SO_SNDTIMEO to work 
with Darwin (FreeBSD).


type
  p : pointer;
  t : TimeVal;

t.tv_sec := mSec div 1000;
t.tv_usec := ( mSec mod 1000 ) * 1000;
p := @t;
if SetSocketOptions( fSocket, SOL_SOCKET, SO_SNDTIMEO, p, SizeOf( t ) ) 
 0 etc


returns Math argument out of domain of func, i.e. EDOM error.

Reference http://www.rocketaware.com/man/man2/getsockopt.2.htm
Different OS's use different types.  MS uses pointer to integer, while 
others use a timeval structure.


An suggestions?

P D

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] SO_RCVTIMEO

2005-09-14 Thread Paul Davidson

Thanks, Marco, Anton.  Select it is!

On Sep 14, 2005, at 9:08, Marco van de Voort wrote:


Trying to get SetSocketOptions for SO_RCVTIMEO and SO_SNDTIMEO to work
with Darwin (FreeBSD).

type
   p : pointer;
   t : TimeVal;

t.tv_sec := mSec div 1000;
t.tv_usec := ( mSec mod 1000 ) * 1000;
p := @t;
if SetSocketOptions( fSocket, SOL_SOCKET, SO_SNDTIMEO, p, SizeOf( t )  
)

 0 etc

returns Math argument out of domain of func, i.e. EDOM error.

Reference http://www.rocketaware.com/man/man2/getsockopt.2.htm
Different OS's use different types.  MS uses pointer to integer, while
others use a timeval structure.

An suggestions?


google freebsd sol_socket so_sndtimeo

yields:

http://66.249.93.104/search?q=cache:1LP6r0fqaU4J:dbforums.com/arch/ 
186/2003/1/654712+sol_socket+freebsd+so_sndtimeohl=en

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Darwin compilation

2005-09-13 Thread Paul Davidson

This fix works, but now:

h2pas.pas:5708:Fixup of 34988 too large for field width of 16 bits
h2pas.pas:5683:Fixup of 35076 too large for field width of 16 bits
h2pas.pas:5664:Fixup of 35140 too large for field width of 16 bits
h2pas.pas:5622:Fixup of 35288 too large for field width of 16 bits
h2pas.pas:5542:Fixup of 35580 too large for field width of 16 bits
h2pas.pas:5540:Fixup of 35588 too large for field width of 16 bits
h2pas.pas:5537:Fixup of 35600 too large for field width of 16 bits
h2pas.pas(2879,15) Error: Error while assembling exitcode 1
h2pas.pas(2879,15) Fatal: There were 2 errors compiling module, stopping
h2pas.pas(2879,15) Fatal: Compilation aborted
make[3]: *** [h2pas] Error 1
make[2]: *** [h2pas_all] Error 2
make[1]: *** [utils_all] Error 2
make: *** [build-stamp.powerpc-darwin] Error 2

On Sep 13, 2005, at 16:55, Florian Klaempfl wrote:


Paul Davidson wrote:


Darwin fails make all. Checked out revision 1075.

genmath.inc(1115,28) Fatal: Internal error 200507161
genmath.inc(1115,28) Fatal: Compilation aborted


Fixed.


make[7]: *** [system.ppu] Error 1
make[6]: *** [darwin_all] Error 2
make[5]: *** [rtl] Error 2
make[4]: *** [next] Error 2
make[3]: *** [ppc2] Error 2
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.powerpc-darwin] Error 2

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpGetRUsage

2005-09-08 Thread Paul Davidson

On Sep 7, 2005, at 13:45, Jonas Maebe wrote:

On 31 Aug 2005, at 15:52, Paul Davidson wrote:

Trying to get fpGetRusage to work WITH DARWIN.

Using: function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl; external 'c' name 'getrusage';

But this gives silly results.  Any hints?

How did you declare prusage/trusage?


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


	function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl; external 'some_random_string' name 'getrusage';

P Davidson
http://CoraxNetworks.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Dynamic-linker

2005-09-02 Thread Paul Davidson
fpc 2.1.1 (2005/07/24)  Darwin

When compiling with -pg (generate profiling data)
linker complains with: x-tad-smaller/usr/bin/ld: unknown flag: -dynamic-linker=

/x-tad-smaller
P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify Corax Networks immediately by email at [EMAIL PROTECTED]  Thank you.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] fpGetRUsage

2005-09-02 Thread Paul Davidson
Trying to get fpGetRusage to work.

Using: 	function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl; external 'c' name 'getrusage';

But this gives silly results.  Any hints?

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify Corax Networks immediately by email at [EMAIL PROTECTED]  Thank you.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] fpGetRUsage

2005-09-02 Thread Paul Davidson
(Oops)
Trying to get fpGetRusage to work WITH DARWIN.

Using: 	function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl; external 'c' name 'getrusage';

But this gives silly results.  Any hints?


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify Corax Networks immediately by email at [EMAIL PROTECTED]  Thank you.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Recursion

2005-07-17 Thread Paul Davidson

Having problem with app.  It is rule based, and operates with recursion.
Events, such as HTTP requests, timers etc, are processed in separate 
threads such that rule engine can handle more than one request at a 
time.


When a rule cascade recurses for 10th time, a thread dies.  But only 
first time.  Triggering the same rule cascade any time after that works 
perfectly - up to depths of 150+


Mac OS/Darwin.
No objects are created or destroyed during rule cascade.
Not dependent on size of rules
FPC 1.9x to 2.x.x

Any hints at all?  Been tracking this bug for months :|

P Davidson


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] cMem, cThreads

2005-07-14 Thread Paul Davidson

Does cThreads require cMem in program uses clause?

i.e.
uses
  cMem,
  cThreads,
  etc.

It appears that removing cMem causes memory corruption in Darwin.

Thanks

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] exit ?

2005-05-25 Thread Paul Davidson

Perhaps combinations of RESULT and EXIT may help?
  if TimeToLeave then begin
Result := 5;
Exit;
  end else 

On May 25, 2005, at 12:33, Jonas Maebe wrote:



On 25 mei 2005, at 18:20, Tony Pelton wrote:


over and above any philisophical judgments on my programming
technique, I see Free Pascal has a reserved word 'exit' that mimics
return ?


Yes.

Is some analogy to return not supported in the official pascal 
dialect ?


exit with a parameter is not supported in other compilers afaik (e.g. 
exit(5), equivalent to return 5). It may exist in Delphi (I've never 
used Delphi), but it definitely does not exist in Turbo Pascal.



is 'exit' the only way to do this, and obviously, not portable to
other compilers ?


Exit without a parameter is supported in Turbo Pascal and Delphi.


is there another token that i could/should use ?


Not that I can think of.


Jonas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] OS X Tiger

2005-04-30 Thread Paul Davidson
Will the FreePascalForXcode1.1.dmg work with XCode 2?
On Apr 29, 2005, at 13:23, Jonas Maebe wrote:
On 29 apr 2005, at 19:14, Paul Davidson wrote:
Any tests done on Tiger with FPC?
Not by me.
Anything pending?
Not until I get it via ADC, which could easily take another month. But 
I do not expect any problems, we do not use any undocumented or 
discourage functionality.

(32 or 64 bit)
There is no 64 bit PPC support yet in FPC, so it will be 32 bit.
Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] OS X Tiger

2005-04-29 Thread Paul Davidson
Any tests done on Tiger with FPC?
Anything pending?
(32 or 64 bit)
P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 1.9.8 - new TThread warning?

2005-02-25 Thread Paul Davidson
Remove $THREADING directive.  It is now built in
On Feb 25, 2005, at 8:07, chromdildo wrote:
Hello,
Great! just picked it up few minutes before announced :)
now it throws warning (1.9.6 didn't)
Warning: Illegal compiler directive $THREADING
(I used {$THREADING ON} as described in the docs)
I followed the instructions given in the docs about multithreading.
i.e.   {$ifdef unix},cthreads{$endif}
My question: Does something has changed?
Already submitted a bugreport TThread.OnTerminate never gets called 

I still can't get it to work.

Thanks, best regards and keep up this good work
./chrom

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Debugger on OS X

2005-01-30 Thread Paul Davidson
1) Is it possible to view strings in XCode (1.5).  At present can only 
see first char ( C style char)

2) Any testing of fpc on Tiger yet?  May be getting developer version 
next week

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Nonfunctional debugger on OS X

2005-01-29 Thread Paul Davidson
Using XCode as well.  It would be good idea to upgrade your compiler to 
1.9.6.  Go to directory containing fpc dir and:

  cvs -z 3 -d :pserver:[EMAIL PROTECTED]:/FPC/CVS checkout -r 
RELEASE_1_9_6

Build instructions are at 
http://www.surtec.com/~rj/Xcode-FreePascal/#FPC/CVS-Quickstart

As far as variables are concerned, you can typically only see local 
vars.  Never been able to see string in meaningful way.

You may also wish to re-install the fpc XCode files
pd
On Jan 29, 2005, at 1:14, Lance Boyle wrote:
I'm trying out FPC on OS X using XCode and am having trouble 
debugging. I installed FPC a few months ago and I _think_ I have 
1.9.5, and I used the very cool Xcode Integration Kit at the time. I'm 
using XCode 1.5 on 10.3.7.

I also have installed GNAT, the Ada 95 compiler.
I think GNAT replaces or patches GDB or some file associated with GDB.
When I run the Hello World for the Pascal Tool (console app) with a 
breakpoint set on the writeln('Hello, World!'), the debugger sees it 
(execution pauses) but I'm not able to see the value of i, the loop 
variable, in the debugger window. I tried adding an array and I can't 
see it either.

I'm wondering if the GNAT-altered GDB is causing the problem.
I think there is a Mac GNAT person on one of the Pascal lists, so I'm 
wondering if I might get a hint as to what is happening here.

I'll paste the debug output below.
Thanks for any help,
Jerry
[Session started at 2005-01-28 22:59:40 -0700.]
GNU gdb 2003-01-28-cvs (Tue Jan  6 00:06:50 GMT 2004)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for 
details.
This GDB was configured as powerpc-apple-darwin7.2.0.
Loading program into debugger
tty /dev/ttyp1
warning: Mapped symbol file /usr/libexec/gdb/symfiles/dyld.syms is 
for a different version of GDB; ignoring
warning: Mapped symbol file 
/usr/libexec/gdb/symfiles/libSystem.B.dylib.syms is for a different 
version of GDB; ignoring
Program loaded.
run
[Switching to process 3019 local thread 0xd03]
Running
warning: Mapped symbol file 
/usr/libexec/gdb/symfiles/libmathCommon.A.dylib.syms is for a 
different version of GDB; ignoring
Warning: the current language does not match this frame.
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!

Debugger stopped.
Program exited with status value:0.(gdb)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
IMPORTANT NOTICE:  This message is intended only for the use of the 
individual or entity to which it is addressed. The message may contain 
information that is privileged, confidential and exempt from disclosure 
under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are notified that any 
dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error, 
please notify Corax Networks immediately by email at 
[EMAIL PROTECTED]  Thank you.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Odd CRT

2004-12-28 Thread Paul Davidson
OS X 10.3.6

This code makes a window area in center of screen, and prints in that area.  The new window is filled with characters when DELLINE is used.  Any hints?

program TestCRT;

uses
CRT;

var
f : text;

procedure win( s : string );
begin
Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
GotoXY( 1, 1 );
//		DelLine;
Window( 1, 1, ScreenWidth, ScreenHeight ); 
readln;
GotoXY( 1, ScreenHeight - 2 );
Write( f, s );
end;


begin


// Set up basic screen
AssignCRT( f );
Rewrite( f );
// Make screen BLUE
GotoXY( 1, 1 );
TextBackground( Blue );
ClrScr;
// Middle window
Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
GotoXY( 1, 1 );
TextBackground( Cyan );
ClrScr;


// First message
ClrScr;
GotoXY( 1,ScreenHeight );
TextColor( Blue );
Window( 1, 1, ScreenWidth, ScreenHeight );
GotoXY( 1, ScreenHeight - 2 );
Write( f, 'Morning' );

// Send some lines
Win( 'Hello' );
Win( 'This is a test ' );




// Wait for human
readln;




end.

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] (no subject)

2004-12-28 Thread Paul Davidson
OS X 10.3.6

This code makes a window area in center of screen, and prints in that area.  The new window is filled with characters when DELLINE is used.  Any hints?

program TestCRT;

uses
CRT;

var
f : text;

procedure win( s : string );
begin
Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
GotoXY( 1, 1 );
		DelLine;
Window( 1, 1, ScreenWidth, ScreenHeight ); 
readln;
GotoXY( 1, ScreenHeight - 2 );
Write( f, s );
end;


begin


// Set up basic screen
AssignCRT( f );
Rewrite( f );
// Make screen BLUE
GotoXY( 1, 1 );
TextBackground( Blue );
ClrScr;
// Middle window
Window( 1, 3, ScreenWidth, ScreenHeight - 2 );
GotoXY( 1, 1 );
TextBackground( Cyan );
ClrScr;


// First message
ClrScr;
GotoXY( 1,ScreenHeight );
TextColor( Blue );
Window( 1, 1, ScreenWidth, ScreenHeight );
GotoXY( 1, ScreenHeight - 2 );
Write( f, 'Morning' );

// Send some lines
Win( 'Hello' );
Win( 'This is a test ' );




// Wait for human
readln;




end.


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Threading

2004-11-26 Thread Paul Davidson
It works under Delphi/Windows.  If that has any weight?
On Nov 26, 2004, at 15:13, Jonas Maebe wrote:
On 26 nov 2004, at 21:02, Paul Davidson wrote:
fpc 1.9.5 [2004/11/26]  Darwin 10.3
And for the record: it's the same under Linux/x86, it's not Darwin or 
Mac OS X specific. But I have no idea whether the behaviour is correct 
or not.

Jonas
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal