Re: [fpc-pascal] private type and type compatibility

2013-10-31 Thread waldo kitty

On 10/31/2013 7:38 AM, Frederic Da Vitoria wrote:

2013/10/31 Sven Barth pascaldra...@googlemail.com

[...]

It's this way at least since Turbo Pascal (though without classes then ;) ).


Yes, I agree this is the TP/Delphi way, and as such should be kept at least in
DELPHI mode.


and TP mode, of course ;)


But is this really good? Doesn't this contradict the Pascal
philosophy? Borland did a few questionable things (look at how you used the
semicolons in you examples above ;-) ),


i can't see anything untoward with their use... they are statement separators, 
after all ;)



and it took some decisions when
implementing units. But how is this handled in Modula?


:)

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] SqlDB fails under Windows to create a new Firebird database

2013-10-30 Thread waldo kitty

On 10/30/2013 8:13 AM, Graeme Geldenhuys wrote:

Here is the console output of when I run the program.

---
c:\programming\m2_system\Scriptsmakedb -d
'127.0.0.1:c:\programming\data\m2_dl_3019.fdb'
Creating database... '127.0.0.1:c:\programming\data\m2_dl_3019.fdb'
exception at 00431BD8:
  : CreateDB :
  -I/O error during open operation for file 
  -database or file exists.
---

I'm using FPC 2.6.2 32-bit on Windows 2000. Any clues what is wrong? And why
does this code work on Linux and FreeBSD. Also, even though the error mentions
the fact that the database or file exits, that is definitely NOT true. There
is no existing *.fdb file.


what happens if you leave the drive designation (c:) out?

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty


question: in simple language, how can i have a routine with differing parameters 
like some routines in FPC and Lazarus do? i've never attempted this before and 
it is completely alien to my experience but i do use the functionality quite a 
lot with existing routines...


description: i have a class object with an internal routine that i want to be 
able to pass no or different parameters to.


example:  procedure MyObject.MyRoutine;
  procedure MyObject.MyRoutine(VarA : SomeType);
  procedure MyObject.MyRoutine(VarA : string; VarB: integer);

at one point, the first instance would be used... at another point one of the 
other instances would be used with the only difference being the parameters that 
are passed or not... i know that i would have individual instances with the 
necessary header and code for each... i just don't know if there is anything 
else special that needs to be done or if it can be done with an internal class 
object routine..



--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty

On 10/29/2013 1:56 PM, Sven Barth wrote:

Am 29.10.2013 18:21 schrieb waldo kitty wkitt...@windstream.net:
  example:  procedure MyObject.MyRoutine;
procedure MyObject.MyRoutine(VarA : SomeType);
procedure MyObject.MyRoutine(VarA : string; VarB: integer);
 
  at one point, the first instance would be used... at another point one of the
  other instances would be used with the only difference being the parameters 
that
  are passed or not... i know that i would have individual instances with the
  necessary header and code for each... i just don't know if there is anything
  else special that needs to be done or if it can be done with an internal 
class
  object routine..

The most important point to keep in mind us that the parameters need to be
different (the result type does not count though!).


in this specific case, it will be one without any parameters (the original in 
the 3rd party library) and one with parameters (my needed modifications)...



And you should be careful if
you decide to additionally use default parameters for overloaded functions.


hummm... i don't think i need to do that in this case... just having the 
original unmodified routine for use like always and then my new one with 
parameters...



Note: In mode Delphi and a few other cases (e.g. cross unit overloads,
inheritance) you'll need to add the overload directive.


ahhh... i believe that the library i'm using does use mode delphi all over the 
place... do i add overload; to each of the 'duplicate' routines?



For additional information please look at the language reference guide (can't
look up the link currently).


i don't even know what to search for... although 'overload' may give me a 
start...

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty

On 10/29/2013 2:35 PM, Mark Morgan Lloyd wrote:

waldo kitty wrote:

example:  procedure MyObject.MyRoutine;
  procedure MyObject.MyRoutine(VarA : SomeType);
  procedure MyObject.MyRoutine(VarA : string; VarB: integer);

at one point, the first instance would be used... at another point one of the
other instances would be used with the only difference being the parameters
that are passed or not... i know that i would have individual instances with
the necessary header and code for each... i just don't know if there is
anything else special that needs to be done or if it can be done with an
internal class object routine..


Just give it a whirl as you've shown, I think you've got it right.


really? that easily?! no way! i was just guessing based on what i've seen in 
some of the documentation of some routines but i never guessed that it would be 
that easy to do at any time :)



Another
useful variant is giving *the* *last* parameter an optional value, which will
allow you to omit the parameter:

procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1);


very interesting... will this work with both parameters, too? i don't think i 
need it in this specific situation, though... i'm mainly wanting to provide the 
original unmodified routine and my modification of it so i can return something 
to that 3rd party library development...


FWIW: i decided to try this because i was unable to (hope i'm using the proper 
terms here) derive a new object from the existing one and override this one 
inherited routine with my modifications... this would allow me to add my own 
variables to the object in addition to what it comes with and allow me to have 
this routine as i need it... but that didn't work for some reason and i've 
already ripped out all that attempt and gone this route with my modified routine 
and direct addition of the variable... i just want to be able to provide 
something back with as little intrusion to the original as possible...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] same routine with different parameters?

2013-10-29 Thread waldo kitty

On 10/29/2013 6:53 PM, Mark Morgan Lloyd wrote:

waldo kitty wrote:


Another
useful variant is giving *the* *last* parameter an optional value, which will
allow you to omit the parameter:

procedure MyObject.MyRoutine(const VarA : string; VarB: integer= -1);


very interesting... will this work with both parameters, too? i don't think i
need it in this specific situation, though... i'm mainly wanting to provide
the original unmodified routine and my modification of it so i can return
something to that 3rd party library development...


Yes, provided that you don't also try to have a procedure with no parameters. In
general, the compiler will tell you if you're doing something silly.


hummm... it wouldn't be the first time that i've not groked what the error 
messages were trying to tell me... that's why i decided to try this vector 
instead of the failed attempts to create another opbject based on the original 
and inherit the procedures with a replacement of this particular one...



Assume that this is for value parameters only. In particular, I don't think
there's a way of defaulting a var parameter to a nil pointer.


hummm... the original has no parameters at all... my addition has two... will 
this be a problem? no, i've not had a chance to get back to the development 
machine and try :?


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Namespaces Support

2013-10-26 Thread waldo kitty

On 10/25/2013 10:18 PM, Fabrício Srdic wrote:

I know I'm a newbie in fpc,


myself.. even after almost a decade ;)


As Michael and Sven said, if Delphi itself is not fully compatible among
versions, why should fpc be?


because FPC (and lazarus) strives to be better? and to not alienate those who 
use it by forcing them to adjust all their working code when a new version comes 
out?


i have nothing more to offer on your other statements but i can agree with them 
to a point... but then there is documentation that shows what is what, right? :)


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Namespaces Support

2013-10-26 Thread waldo kitty

On 10/26/2013 7:06 PM, Fabrício Srdic wrote:

If the namespace feature isn't a improvement, so why was it added to fpc?


compatibility with delphi products that use it??


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread waldo kitty

On 8/20/2013 17:11, David Emerson wrote:

I am trying to compile some of the aggpas examples included with lazarus, but I
am getting errors upon errors.


the first thing is what errors? we do appreciate your confidence in our 
telepathic and remote viewing abilities but some things just cannot be handled 
in either of these manners ;)


then there are (at least) these questions

1. what OS?
2. what version of FPC?
3. how is your FPC installed? package or from SVN?

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] aggpas examples

2013-08-20 Thread waldo kitty

On 8/20/2013 23:16, waldo kitty wrote:

the first thing is what errors? we do appreciate your confidence in our
telepathic and remote viewing abilities but some things just cannot be handled
in either of these manners ;)


damned fingers... i didn't get a chance to add the requisite [humor] tags 
before the above was sent...


FWIW: in one of my other current lives, as a support person, the above is not so 
much humor...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-18 Thread waldo kitty

On 8/18/2013 02:52, Reinier Olislagers wrote:

On 17/08/2013 19:34, waldo kitty wrote:

[...]

so you started as #1 above and svn up to #2... when you run make clean,
the old mylib.o,.a,.ppu files are still in \projects\myproject somewhere
and may be used by the compiler instead of those that should be in
\projects\libs where you moved your mylib.pas file to...

is that clearer now??


I'll take you at your word. I don't use makefiles in my projects.


right but others (FPC and Lazarus) do... not to mention that it was an example 
and i didn't feel like laying out the whole lazarus tree to show it from that 
perspective...


in any case, failing to run make clean or make disclean /before/ svn up 
can lead to problems with old libraries being left in old locations when files 
are moved... we've seen this exact situation with Lazarus in numerous cases... 
the standard response has been to run the Clean up build files option which 
removes all .o, o., and .ppu files so they can be rebuilt from the proper source 
files from their (new) locations...


question: at what point does your updater tool perform make clean or make 
distclean? before or after or both, before and after, the svn update?


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-18 Thread waldo kitty

On 8/18/2013 09:49, Mattias Gaertner wrote:

On Sun, 18 Aug 2013 09:43:37 -0400
waldo kittywkitt...@windstream.net  wrote:


On 8/18/2013 02:52, Reinier Olislagers wrote:

On 17/08/2013 19:34, waldo kitty wrote:

[...]
in any case, failing to run make clean or make disclean /before/ svn up
can lead to problems with old libraries being left in old locations when files
are moved... we've seen this exact situation with Lazarus in numerous cases...
the standard response has been to run the Clean up build files option which
removes all .o, o., and .ppu files so they can be rebuilt from the proper source
files from their (new) locations...


make clean only cleans up the Lazarus files.
Clean up build files cleans up the user project and
packages too.


ahh! thanks for the clarification... Clean up build files does for projects 
what clean and distclean do for FPC and Lazarus... that does make sense 
since the projects cannot be known by FPC's and Lazarus' building makefiles :)


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 04:44, Juha Manninen wrote:

On Sat, Aug 17, 2013 at 3:40 AM, waldo kittywkitt...@windstream.net  wrote:

FWIW: i learned a while back (from the lazarus list i think) to perform
make clean before svn up because the make files may have changed and the
new ones may not know where the old files resided...

performing make clean first clears the existing directories... then svn
up followed (possibly with another make clean and then) by your normal
build flow should result in a truly clean build flow without the possibility
of lingering old .o and/or .a build files...


I don't think the extra make clean before svn up will really help
because the generated object files are not under revision control.


right... but what happens when source files are moved from one directory to 
another? the original make clean will ensure that their compiled versions are 
removed before the svn up moves them and puts a new makefile in place that 
can't remove them because it doesn't know the old directory...


and it wouldn't be an extra make clean either... you are right that the .o 
and .a files are/should not be under revision control... that's why i stated 
possibly ;)



To make sure you don't have local modifications in revisioned files, do :
svn revert -R .


right... but that still doesn't do anything for makefile changes and source 
files moving from one directory to another leaving behind old .o and .a files 
that the compiler finds and uses leading to unexplained errors, bugs and problems...


i think i've explained it clearer now?

make clean
svn up
make

for the general basic flow...

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 04:57, Reinier Olislagers wrote:

Also, there have been oversights in the past in what gets cleaned by
make clean, so I usually do a recursive delete of .a, .o, .ppu followed
by e.g. an svn revert -R or svn up to get any files back that are required.


right... that's why clean should be done before svn update... that way the old 
.a .o .ppu files are removed and then the update can move the sources to another 
directory as well as updating the makefile for the new files' locations...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 07:35, Reinier Olislagers wrote:

I appear to be unclear. The makefile sometimes does not specify all
.a/.o files to clean. Therefore make clean does not clean all .a/.o
files, i.e. does not work, i.e. doing just make clean is not always enough.


no, you are perfectly clear... clean doesn't always work... distclean should... 
i've never used distclean in my update scripts but i will be changing that 
soonest...



As for the update can move the sources to another directory etc: no
idea what you're talking about there


:(  think about it... you have a source tree like this

#1
  \projects
  \projects\libs
  \projects\myproject
  \projects\myproject\myproject.pas
  \projects\myproject\mylib.pas

you have refined mylib.pas to the point that you want to use it in other 
projects so you move it to \projects\libs and adjust the makefile accordingly...


#2
  \projects
  \projects\libs
  \projects\libs\mylib.pas
  \projects\myproject
  \projects\myproject\myproject.pas


so you started as #1 above and svn up to #2... when you run make clean, the old 
mylib.o,.a,.ppu files are still in \projects\myproject somewhere and may be used 
by the compiler instead of those that should be in \projects\libs where you 
moved your mylib.pas file to...


is that clearer now??

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-16 Thread waldo kitty

On 8/16/2013 10:52, Eric Kom wrote:

svn up
make clean

[trim]

FWIW: i learned a while back (from the lazarus list i think) to perform make 
clean before svn up because the make files may have changed and the new ones 
may not know where the old files resided...


performing make clean first clears the existing directories... then svn up 
followed (possibly with another make clean and then) by your normal build flow 
should result in a truly clean build flow without the possibility of lingering 
old .o and/or .a build files...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: [Lazarus] Should TObject or TComponent have a Comment property?

2013-07-16 Thread waldo kitty

On 7/16/2013 17:56, vfclists . wrote:

I have 2 main concerns here, a comment for the component itself which is not
particularly important and a comment for the component when I add it to a form
or data module. When I create a method I can add a comment to the method. If I
create a component in code, I can label that section of code, but if I drag and
drop a component from the palette onto the form what option do I have?


if one doesn't know what a component does when they drag it from the pallet, 
shouldn't they have the docs open which explain that component?



Descriptive variable and component names have a habit of getting too long.


agreed... i hate typing in 10+ character var or routine names... especially 
since i'm still working on trying to move from the old DOS TP6 environment ;)



It is hardly for the end users sake unless the enduser is a programmer. I just
need something to help when working in the IDE, eg hovering over a component and
seeing the comment in addition to what is current displayed.


i feel ya, man... i feel ya O:)

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] It is possible to pass command line to pascal

2013-06-30 Thread waldo kitty

On 6/29/2013 20:53, Johan Tu Toit wrote:

On 6/30/13, waldo kittywkitt...@windstream.net  wrote:


FWIW: top posting is like reading a book backwards... please post below
existing quotes...


*^^^*

i fixed your quotes and reply...



On 6/29/2013 18:59, Johan Tu Toit wrote:

I Tried, but only return an integer not a string value.


what were you expecting to see as a result?


return string


what string? the program executed from within your program doesn't return 
strings... the programs termination code is numeric...


on the other hand, the program executed from within your program may emit some 
text to the screen... this text may be being sent to stdout or stderr or both... 
there are methods of capturing this output... is this what you are asking for?


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] It is possible to pass command line to pascal

2013-06-30 Thread waldo kitty

On 6/30/2013 05:41, Rainer Stratmann wrote:

  On Sunday 30 June 2013 00:59:59 you wrote:

I Tried, but only return an integer not a string value.


Thats right.

You have to put the result in a file and then afterwards read the file.

ls uname -r  file.txt


what?! that's not right... i've never done that... not even with Turbo Pascal 
6... it does take a bit of setup to be able to capture the output of a program 
executed from within one's program but once the routines are written, they are 
easy to use... i'm extremely sure that FPC has such routines available...



The integer is the result code of the execution.
It contains information if the execution was successful.


true...

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] It is possible to pass command line to pascal

2013-06-30 Thread waldo kitty

On 6/30/2013 08:14, Mark Morgan Lloyd wrote:

Rainer Stratmann wrote:

On Sunday 30 June 2013 12:32:30 you wrote:

If I had to go on, what's that -r supposed to be doing?


It is not too difficult to find out.

If you speed up your engine then you can find out that he wants to know the
actual Linux kernel number.

'uname -r'


In which case why is he putting ls in front of it? -r is a valid option to both
uname and ls, so since we're already looking at a broken command it's entirely
valid to ask which it's supposed to apply to.


agreed... the example given by the OP is incorrect to start with...

$ ls uname -r
ls: cannot access uname: No such file or directory


$ sudo ls uname -r
[sudo] password for user:
ls: cannot access uname: No such file or directory


perhaps someone should slow down their engine and look closer at what is 
posted? ;)

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] It is possible to pass command line to pascal

2013-06-30 Thread waldo kitty

On 6/30/2013 08:44, Rainer Stratmann wrote:

  On Sunday 30 June 2013 14:14:56 you wrote:


In which case why is he putting ls in front of it?


I guess he simply does not know by now and tries out something.


don't guess... others cannot learn from assumptions and guesses...


-r is a valid option
to both uname and ls, so since we're already looking at a broken command
it's entirely valid to ask which it's supposed to apply to.


I bet he wants to know the Linux version.
'uname -r' is the unambiguous assignment for that.


while that is true, there is still the ambiguous 'ls' in front which will return 
an error of file not found and an exit code of 1...



With 'uname -r  file.txt' you redirect the output in a file.
Then cou can read the file.

I am sorry, but you try to make a very simple thing complicated.


You might call having to invoke a shell with the -c option to get the
redirection working, working out where to put the temporary file,
deleting it on completion and making sure that all error conditions are
handled simple. I certainly don't.


It is not necessary to delete the file.


so you propose to leave temporary files laying about all over the place 
polluting the filesystem?



All error conditions you can read in the man page of the command.


only if man is installed and if the manpages for that command exist... this 
cannot be assumed to be true all the time and for all situations...



But as Marco has already reminded us, the information is already
available from a standard library call.


Very good! Then you bet, too?


only IF that is the information the OP is looking for... we don't know yet what 
that information is because the leading 'ls' has not been addressed...



Calling an external program is
not something to be approached for a trivial reason,


It works perfectly with linux. And is simple. The command is executed like
every other function in your pascal program.


but capturing the output is not simple... redirection is a function of the shell 
and your example doesn't load the shell to start with...



unless you're
writing shell or in a scripting language such as Perl where it might be
less trouble than searching CPAN for the appropriate extension module.


Why do you try to make it magotty and more complicated than necessary?


make it what?? you cannot redirect without the shell or by taking additional 
steps to emulate what the shell does to allow redirecting...



--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] It is possible to pass command line to pascal

2013-06-30 Thread waldo kitty

On 6/30/2013 09:12, Johan Tu Toit wrote:

sorry it is my fault it was suppose to be: $uname -r


ok... thank you for clarifying that ;)

have you learned what you need to do from the link leledumbo gave earlier in 
this thread?


http://wiki.lazarus.freepascal.org/Executing_External_Programs



--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to save a huge XML?

2013-06-19 Thread waldo kitty

On 6/19/2013 06:14, Graeme Geldenhuys wrote:

On 2013-06-19 08:47, Michael Van Canneyt wrote:

The problem is that the source XML is completely in memory, which is why it 
takes so much memory after while.


+1

And if logging is the use case, XML is by far the worst format anybody
could choose.


yep... if it were myself, i would log in a regular more normal logging format... 
then i might create a tool to parse the log and output xml line by line as has 
been discussed... that way the logging is still as fast as it can be while those 
desiring xml can process the logs and get what they want... or they can create 
their own tool... but i guess $$$ talk, too ;)


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread waldo kitty

On 6/12/2013 05:13, Dennis Poon wrote:

Michael,

I just typed ld -v and it replied:
GNU ld (GNU Binutils for Debian) 2.22


and what do you get if you type

/usr/mips-linux-gnu/bin/ld -v

??

just typing ld -v uses the one in your path and not necessarily the one that 
you want to verify/validate... you might want to test each of those utilities as 
above by specifying the full path from your manual command line...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-12 Thread waldo kitty

On 6/12/2013 05:40, Michael Schnell wrote:

On 06/12/2013 11:13 AM, Dennis Poon wrote:

Michael,

I just typed ld -v and it replied:
GNU ld (GNU Binutils for Debian) 2.22

You'd better do

gcc -v

This should output (among others) a line starting Target:

Same will state the architecture and be something like Target: MIPS-linux


why not specify the full path? it seems that someone is blindly typing exactly 
what is written instead of adding the specific path /usr/mips-linux-gnu/bin/ 
to the command...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux - MIPS-linux?

2013-06-08 Thread waldo kitty

On 6/8/2013 06:31, Sven Barth wrote:

Please remind me not to update wiki articles early in the morning.


Psst! Remember to not update wiki articles early in the morning! O:)

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2013-05-31 Thread waldo kitty

On 5/31/2013 07:31, Dennis wrote:

I am using LNet 's SSL sockets on ubuntu.
When I use a self signed certificate and the browser gets a warning, it seems
the browser immediately send a close-notify or shutdown ssl signal to the server
and then without waiting close the connection.


sadly, this is common practice... in a firewall product i work with, we called 
the traffic afterward a spurious firewall hit because the firewall logged the 
traffic which came after the connection was already terminated... most of the 
time, this traffic was termination acknowledgment...


this problem can originate in the other direction as well... the server may 
close the connection without waiting on the client to acknowledge... both cases 
can be problematic (eg: spurious firewall hit)



On my server side (written with Lnet  SSL), it did not know the connection was
closed already and still thinking of handling the close-notify + shutdown tries
to shutdown the SSL on its side and then encounter the serious PIPE error (which
I guess it tries to send acknowledge of the close-notify/shutdown back to the
browser) when the pip is already closed.  I guess Lnet SSL implementation is not
aware that the other side can close the connection without waiting for its
acknowledgement.


sounds like it...


This external SIGPIPE immediately crash the program even though the original
Lnet codes has a try except block.

Is there something I can do to trap this external SIGPIPE?

(I tried emaillng the author but no response for weeks).


i have no idea... i only wanted to provide confirmation of the practice as 
mentioned above...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2013-05-15 Thread waldo kitty

On 5/15/2013 12:18, silvioprog wrote:

But I dont added it, please see:

Makefile:2704: *** The only supported starting compiler version is 2.6.2. You
are trying to build with 2.7.1. If you are absolutely sure that the current
compiler is built from the exact same version/revision, you can try to use
OVERRIDEVERSIONCHECK=1 to override .  Stop.

So I'm usgin only make clean all and after sudo make install PREFIX=/usr.


what about the second sentence of that error message?

   You are trying to build with 2.7.1.

that's the problem... you have to build it with 2.6.2...

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2013-05-15 Thread waldo kitty

On 5/15/2013 14:50, Marco van de Voort wrote:

In our previous episode, waldo kitty said:

Makefile:2704: *** The only supported starting compiler version is 2.6.2. You
are trying to build with 2.7.1. If you are absolutely sure that the current
compiler is built from the exact same version/revision, you can try to use
OVERRIDEVERSIONCHECK=1 to override .  Stop.

So I'm usgin only make clean all and after sudo make install PREFIX=/usr.


what about the second sentence of that error message?

 You are trying to build with 2.7.1.

that's the problem... you have to build it with 2.6.2...


Personally,  I think mentioning OVERRIDEVERSIONCHECK is the problem.
Whatever you write as text, people will only read that.


agreed... i really wanted to leave it out of my previous suggested rewrite of 
the error message but i didn't...



The message should refer to a boringly long FAQ item, with the mention of
overrideversioncheck only mentioned inline in text in the last line.


agreed^2 :)


Makefile:2704: *** The /only/ supported starting compiler is 2.6.2. You are 
trying to build with 2.7.1. You CANNOT do this! See this FAQ: 
http://some.domain.somewhere/FAQ/why-cant-i-compile-FPC.html



O:)


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] AT-SPI fpc compatible ?

2013-05-08 Thread waldo kitty

On 5/8/2013 04:34, Fred van Stappen wrote:

 The point is nevertheless that you answered to an existing thread with a
 completely new/unrelated question.

OK, my fault, i wanted to answer to my own tread an that answer appears like a
new one ( i used ( RE: ... ) in place of (Re: ...). ).


that doesn't matter... it is the references field that matters... if there is 
one then the message belongs in an existing thread... without one, it is a new 
thread...


start new thread via write new message not reply to existing thread ;)

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] systemh.inc(117, 16) Error: Duplicate identifier FarPointer

2013-05-08 Thread waldo kitty

On 5/8/2013 12:22, Mark Morgan Lloyd wrote:

waldo kitty wrote:


You are trying to build with 2.7.1. If you are absolutely sure that the
current compiler is built from the exact same version/revision, you can try
to use OVERRIDEVERSIONCHECK=1 to override . Stop.



perhaps the message is too long and too informative? maybe something like a
bikini (short and to the point) would be better?

eg : Makefile:2704: *** WRONG COMPILER VERSION (2.7.1)! You MUST use 2.6.0 to
compile with. Other compiler versions are not supported! (You might try
OVERRIDEVERSIONCHECK=1 but NO SUPPORT is given for this if it fails!)


I'd suggest that anything like that would be counterproductive, since it implies
that prompt support will be given for things that are even dumber- like trying
to compile FPC using Delphi :-)


ok... so then, but NO SUPPORT is given OVERRIDEVERSIONCHECK usage!)

i'm guessing that last section is what you were looking at as giving an 
implication? frankly, it took me several minutes to come up with that and i 
thought it pretty clear and to the point about the wrong compiler version... i 
also wanted to retain the part about OVERRIDEVERSIONCHECK but make it clear that 
no support would be given for its use...


i did even have 2.6.0 or 2.6.2 but decided that was not good even though it 
may be supported...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] systemh.inc(117, 16) Error: Duplicate identifier FarPointer

2013-05-08 Thread waldo kitty

On 5/8/2013 17:50, Sven Barth wrote:

On 08.05.2013 22:27, waldo kitty wrote:

On 5/8/2013 12:22, Mark Morgan Lloyd wrote:

waldo kitty wrote:


You are trying to build with 2.7.1. If you are absolutely sure that
the
current compiler is built from the exact same version/revision, you
can try
to use OVERRIDEVERSIONCHECK=1 to override . Stop.



perhaps the message is too long and too informative? maybe something
like a
bikini (short and to the point) would be better?

eg : Makefile:2704: *** WRONG COMPILER VERSION (2.7.1)! You MUST use
2.6.0 to
compile with. Other compiler versions are not supported! (You might try
OVERRIDEVERSIONCHECK=1 but NO SUPPORT is given for this if it fails!)


I'd suggest that anything like that would be counterproductive, since
it implies
that prompt support will be given for things that are even dumber-
like trying
to compile FPC using Delphi :-)


ok... so then, but NO SUPPORT is given OVERRIDEVERSIONCHECK usage!)

i'm guessing that last section is what you were looking at as giving an
implication? frankly, it took me several minutes to come up with that
and i thought it pretty clear and to the point about the wrong compiler
version... i also wanted to retain the part about OVERRIDEVERSIONCHECK
but make it clear that no support would be given for its use...

i did even have 2.6.0 or 2.6.2 but decided that was not good even
though it may be supported...



2.6.0 is currently only supported for now. It might be removed sooner or later.


earlier in the thread someone posted that 2.6.2 could be used... that's why i 
thought to maybe include that and then rejected due to the phrasing used (will 
work)...



--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] systemh.inc(117, 16) Error: Duplicate identifier FarPointer

2013-05-07 Thread waldo kitty

On 5/7/2013 02:38, Jonas Maebe wrote:


On 07 May 2013, at 08:21, Eric Kom wrote:


Thanks for the respond! but without option OVERRIDEVERSIONCHECK is set,
another error occurred:

erickom@cloudTwo:~/freePascal27/fpc$ make NOGDB=1 OPT='-O- -gl -Xs-' all
Makefile:2704: *** The only supported starting compiler version is 2.6.0.
You are trying to build with 2.7.1. If you are absolutely sure that the
current compiler is built from the exact same version/revision, you can try
to use OVERRIDEVERSIONCHECK=1 to override .  Stop.


Yes, so follow those instructions (FPC 2.6.2 will also work as a starting
compiler). If you could give us some tips about how those instructions could
say in a clearer way what you are doing wrongly, please say so.


i don't suppose it would draw their eyes to the phrase only supported starting 
compiler by making it bright, bold and blinking on the terminal screen, would it ;)


but maybe making that part all CAPS would draw their eyes to it?

perhaps the message is too long and too informative? maybe something like a 
bikini (short and to the point) would be better?


eg : Makefile:2704: *** WRONG COMPILER VERSION (2.7.1)! You MUST use 2.6.0 to 
compile with. Other compiler versions are not supported! (You might try 
OVERRIDEVERSIONCHECK=1 but NO SUPPORT is given for this if it fails!)




--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-29 Thread waldo kitty

On 4/29/2013 06:04, Reinier Olislagers wrote:

On 29-4-2013 11:50, Lukasz Sokol wrote:

On 27/04/2013 16:06, silvioprog wrote:

2013/4/27 Sven Barthpascaldragon-gM/ye1e23mwn+bqq9rb...@public.gmane.org
mailto:pascaldragon-gM/ye1e23mwn+bqq9rb...@public.gmane.org

On 26.04.2013 21:38, silvioprog wrote:
Oopppss, sorry. I'll delete it. :X


Too late, gmane mail to news already stored it too.


What? The link that shows 404 page not found? Or the actual content?


the original message had a link and the actual code... deleting the link is one 
thing but the code is already distributed around the world and cannot be deleted 
by the OP...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-29 Thread waldo kitty

On 4/29/2013 13:29, silvioprog wrote:

Well, I messed up badly, sorry again.

I don't know if that would solve the problem, but if they prefer, we can delete
me from the FPC lists, because I have no intention to piracy. Will be discretion
of yours guys. x(


speaking only for myself: i think you have learned the lesson and there's no 
reason to kick you out of these lists...


what others do to clean up the mistake on their systems is up to them. of 
course... there may be a method to have the article cancelled from gmane and the 
other news servers that propagate the list in news format... the question is if 
the cancelmsg will propagate thru those news servers and be honored...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-27 Thread waldo kitty

On 4/27/2013 11:06, silvioprog wrote:

2013/4/27 Sven Barth pascaldra...@googlemail.com
mailto:pascaldra...@googlemail.com

On 26.04.2013 21:38, silvioprog wrote:

Select in socket of Delphi 2007 (a friend sent it to me:
http://www.sendspace.com/file/__06ev02:

Gaahhh!!! Don't simply send Delphi code to this list! Did you ever heard of
stuff like clean room reverse engineeering?!

Oopppss, sorry. I'll delete it. :X


you can't delete it from everywhere...

eg: systems that download this _mailing_list_ as separate emails into whatever 
mail reading tool is used...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-27 Thread waldo kitty

On 4/27/2013 13:51, silvioprog wrote:

2013/4/27 waldo kitty wkitt...@windstream.net mailto:wkitt...@windstream.net
On 4/27/2013 11:06, silvioprog wrote:
2013/4/27 Sven Barth pascaldra...@googlemail.com
 On 26.04.2013 21:38, silvioprog wrote:

 Select in socket of Delphi 2007 (a friend sent it to me:
http://www.sendspace.com/file/06ev02:

 Gaahhh!!! Don't simply send Delphi code to this list! Did you ever
heard of stuff like clean room reverse engineeering?!

Oopppss, sorry. I'll delete it. :X

you can't delete it from everywhere...

eg: systems that download this _mailing_list_ as separate emails into
whatever mail reading tool is used...

 From the SendSpace yes. Try to download it now. ;)


what SendSpace?? i've never heard of it... the code came in /inside/ your 
posting... [time passes] there was a link to the code in your post, yes... but 
you also posted the actual code, too...[/time passes]


my example explicitly points to local storage in a email client, as well... if 
you or anyone can delete posts from my local email storage from remote, i'd 
definitely like to know about it :P


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-15 Thread waldo kitty

On 4/14/2013 14:03, Sven Barth wrote:

On 14.04.2013 18:30, waldo kitty wrote:

On 4/14/2013 12:17, Reimar Grabowski wrote:

On Sun, 14 Apr 2013 11:55:14 -0400
waldo kittywkitt...@windstream.net wrote:


2.7.1? that's trunk, right?

Yes.


whew... viewvs made me walk thru every commit as i could not find a way
to limit it to display only the commits for trunk... but i didn't look
all that hard, either...


Click here http://svn.freepascal.org/cgi-bin/viewvc.cgi/ on the revision number
next to trunk.


i tried that but it doesn't show me the files involved in the commit... clicking 
on directory listing link takes me to a listing of trunk and clicking on the 
commit number there takes me to the same page as before and around in circles we 
go...



maybe this commit??

Commit: 23892
Author: florian
Date: Sun Mar 17 14:51:19 2013 UTC (4 weeks ago)
Changed paths: 4
Log Message: + warn if one of the linux libc startup code files is
not found


Most likely.
Now the question remains why the files are not found.
They are located in /usr/lib/x86_64-linux-gnu/.


that i can't say as i don't know :( hopefully someone with deeeper
knowledge will ring in... i just wanted to offer what i could in the
hope that it might be helpful...


as it is, i'm just now updating my winboxen to 2.6.2 from
http://svn.freepascal.org/svn/fpc/tags/release_2_6_2... i don't see a
fixes_2_6_2 branch so i guess the next release is going to be 2.8.0 from
trunk??


The branch is called fixes_2_6


ohhh... that's kinda confusing with there being fixes_2_6_0, too... what version 
is fixes_2_6 if trunk is 2.7.1?

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


Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-15 Thread waldo kitty

On 4/14/2013 15:22, Marco van de Voort wrote:

In our previous episode, waldo kitty said:

that i can't say as i don't know :( hopefully someone with deeeper knowledge
will ring in... i just wanted to offer what i could in the hope that it might be
helpful...

as it is, i'm just now updating my winboxen to 2.6.2 from
http://svn.freepascal.org/svn/fpc/tags/release_2_6_2... i don't see a
fixes_2_6_2 branch so i guess the next release is going to be 2.8.0 from trunk??


Releases are never done from trunk. First, a fixes (fixes_2_8 in this case)
is created, and then a beta and a RC are done from that branch, and
typically about 4-6 months after the fixes branchpoint there is a release.


ok... but that will be branched from trunk, right? if so, i used the wrong 
terminology when i said from trunk...



(e.g. fixes_2_6 was branched in may or june, and release january 1st the
next year)


ok... was it branched from trunk or was is taken from elsewhere?


Rule of thumb for fixes releases is that there will be one more release from
the current fixes branch unless the new fixes branch has been created or
will be created very shortly after.


right... i understand that ;)


I've always assumed that the next release will be 2.6.4.


hummm... i can't keep up with it because so many projects do things so many 
different ways... i was thinking it would be 2.8.0 because of trunk being 
2.7.1... but then i've been trying to figure out what fixes_2_6 was for other 
than only providing fixes for 2.6.2...

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


Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-14 Thread waldo kitty

On 4/14/2013 10:29, Reimar Grabowski wrote:

Hi,

I just updated my FPC 2.7.1 from revision 23807 to 24236 and for every project 
I compile I now get warnings that crti.o and crtn.o are not found.


based on prior discussions on these FPC/Lazarus lists, these are C runtime 
files...

2.7.1? that's trunk, right?


Does anyone know why I suddenly get the warnings?


have you looked at the commit messages?


How do I get rid of the warnings?

This is on Ubuntu 12.10 AMD64.


maybe this commit??

Commit: 23892
Author: florian
Date:   Sun Mar 17 14:51:19 2013 UTC (4 weeks ago)
Changed paths:  4
Log Message:+ warn if one of the linux libc startup code files is not found

Changed paths:
trunk/compiler/msg/errore.msg
trunk/compiler/msgidx.inc
trunk/compiler/msgtxt.inc
trunk/compiler/systems/t_linux.pas

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


Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-14 Thread waldo kitty

On 4/14/2013 12:17, Reimar Grabowski wrote:

On Sun, 14 Apr 2013 11:55:14 -0400
waldo kittywkitt...@windstream.net  wrote:


2.7.1? that's trunk, right?

Yes.


whew... viewvs made me walk thru every commit as i could not find a way to limit 
it to display only the commits for trunk... but i didn't look all that hard, 
either...



maybe this commit??

Commit: 23892
Author: florian
Date:   Sun Mar 17 14:51:19 2013 UTC (4 weeks ago)
Changed paths:  4
Log Message:+ warn if one of the linux libc startup code files is not found


Most likely.
Now the question remains why the files are not found.
They are located in /usr/lib/x86_64-linux-gnu/.


that i can't say as i don't know :( hopefully someone with deeeper knowledge 
will ring in... i just wanted to offer what i could in the hope that it might be 
helpful...



as it is, i'm just now updating my winboxen to 2.6.2 from 
http://svn.freepascal.org/svn/fpc/tags/release_2_6_2... i don't see a 
fixes_2_6_2 branch so i guess the next release is going to be 2.8.0 from trunk??


i don't have trunk in place but might be able to do that shortly... this 
particular system is rather limited in drive space and it has to work first... 
then the other winboxen are mirrored from this one...


after that, i get to try (again) to figure out the best and easiest way to have 
lazarus for each installed FPC :?

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


Re: [fpc-pascal] Warnings crti.o and crtn.o not found

2013-04-14 Thread waldo kitty

On 4/14/2013 12:17, Reimar Grabowski wrote:

On Sun, 14 Apr 2013 11:55:14 -0400
waldo kittywkitt...@windstream.net  wrote:

Commit: 23892
Author: florian
Date:   Sun Mar 17 14:51:19 2013 UTC (4 weeks ago)
Changed paths:  4
Log Message:+ warn if one of the linux libc startup code files is not found


Most likely.
Now the question remains why the files are not found.
They are located in /usr/lib/x86_64-linux-gnu/.


i forgot to add to my previous that there's been other updates to trunk 
already... the latest commit was ~43 minutes ago from the time of this post...


 24242  florian  * better error reporting

which might tell more about this specific problem you are having... but the only 
file modified is trunk/compiler/classes.pas so i don't know...

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


Re: [fpc-pascal] RE: 64 bit cross binutils on a 32 bit OS

2013-04-12 Thread waldo kitty

On 4/12/2013 02:44, leledumbo wrote:

why use cygwin when mingw is available?


Highly *nix tied programs that needs quick porting can use it (e.g.: those
that use X11).


ok...


what is the difference between the two?


MinGW doesn't implement the *nix layer (Msys does, though only for the shell
and small programs, not the whole system), it only consists of GCC port
(with binutils and friends) linked against M$ C runtime library.


hummm... ok...


can i compile an app with either one and then run that app natively on

winwhatever /without/ having to install either cygwin or mingw?

All Cygwin binaries depend on cygwin1.dll, so you must distribute that with
the program. With MinGW, there's a smaller C runtime library that must be
distributed as well. I don't remember either provide statically linked
version of those libraries.


thank you for the information... i've marked it to be saved for future reference 
if it comes up for my needs ;)


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


Re: [fpc-pascal] RE: 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread waldo kitty

On 4/11/2013 10:14, leledumbo wrote:

Anyhow, there is no cygwin target for Free Pascal,

neither win32 nor win64.

Could I ask what for? Cygwin is Unix emulation layer on M$ Windows, what is
it good for when you can target Windows natively?


not that i use either but...

why use cygwin when mingw is available?

what is the difference between the two?

can i compile an app with either one and then run that app natively on 
winwhatever /without/ having to install either cygwin or mingw?


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty

On 4/9/2013 04:14, Mark Morgan Lloyd wrote:

It might be notable that Debian doesn't volunteer a domain name unless it's able
to contact DNS. I'll get onto nslookup, or just use temporary text (it's only
salt for a password hash, and is stored).


understood... your nslookup output looked fine to me... it is kinda of different 
in what mine returns but that's likely the DNS package and the configuration 
differences... (see the link below for an example of my results)


i would attempt to go portable by performing a DNS lookup on the address and or 
the given host name... i don't think i would try to use external programs for 
this but would compare my results with theirs for the same lookups...


FWIW: i also just stumbled over our very similar conversation of a year ago...

 13 April 2012 - Resolving a local hostnames to an IP address

http://free-pascal-general.1045716.n5.nabble.com/Resolving-a-local-hostnames-to-an-IP-address-td5637709.html

(sorry for the wrap)

but this time, you are trying to go the other way i guess... that or just trying 
to get all of the FQDN for the host your app is running on...


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty

On 4/9/2013 04:24, Tomas Hajny wrote:

On Tue, April 9, 2013 10:14, Mark Morgan Lloyd wrote:

waldo kitty wrote:

i note that both, GetDomainName and GetHostName both use the same var
(Sysn : utsname) but just different fields in what is apparently a
record of some type...


[TRIM]


It might be notable that Debian doesn't volunteer a domain name unless
it's able to contact DNS. I'll get onto nslookup, or just use temporary
text (it's only salt for a password hash, and is stored).


Have you tried using unit netdb from package fcl-net? It doesn't support
Windows (and some other platforms yet), but it should work for Unix
targets. I believe that the two approaches for finding out the domain are
either getting it from the DNS or having it specified in /etc/resolv (and
both are used by unit netdb - search for DefaultDomainList).


shouldn't the OS' lookup routines handle whether the value from HOSTS or DNS is 
used automatically? i know that on some systems, one can specify to use HOSTS 
first (ie: USE_HOSTS_FIRST=1 [OS2] or /etc/host.conf [*nix])... i've seen it in 
winwhatever once upon a long time ago...


or am i misunderstanding this aspect and the apps used to perform DNS lookups 
are reacting to this setting and using one value or the other depending on the 
results returned from the initial query?


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty

On 4/9/2013 05:09, Mark Morgan Lloyd wrote:

Ludo Brands wrote:

On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote:


It might be notable that Debian doesn't volunteer a domain name unless
it's able to contact DNS. I'll get onto nslookup, or just use temporary
text (it's only salt for a password hash, and is stored).



One of the problems with uname is that the kernel doesn't have a clue on
how you are connected to the network. Your computer could have 10
network names if it had 10 addresses (not even 10 NIC's required).

Looking up the IP you want the domain name for in a DNS is the only
reliable way. And it is portable.


Thanks Ludo, I'd got there. I think there's still the possibility of ambiguity
if there are multiple DNS servers listed in resolv.conf, but I agree that it's
probably the best way available.


the first DNS server is the one used... if it doesn't respond in X amount of 
time, then it may be retried Y times before the next DNS server listed in resolv 
is tried... then you loop through the time period and retries again for each 
until you get NXDOMAIN or a positive result or have exhausted the list of DNS 
servers in resolv... at that point, the app may return an error code about not 
being able to reach a DNS server...


in some cases, the non-responding DNS server(s) may be blocked out from further 
usage... this may be for some time period or it may require a restart of the 
local DNS server app (DNS Proxy on some systems) or reboot of the system... i 
have at least one system that acts this way (locking out unresponsive DNS server 
entries and requiring a restart of the DNS proxy app)...


my understanding is that this is pretty much all handled by the OS' library code 
for performing the lookups...


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty

On 4/9/2013 14:10, Tomas Hajny wrote:

On Tue, April 9, 2013 19:51, waldo kitty wrote:

On 4/9/2013 04:24, Tomas Hajny wrote:

  .
  .

Have you tried using unit netdb from package fcl-net? It doesn't support
Windows (and some other platforms yet), but it should work for Unix
targets. I believe that the two approaches for finding out the domain
are either getting it from the DNS or having it specified in /etc/resolv
(and both are used by unit netdb - search for DefaultDomainList).


shouldn't the OS' lookup routines handle whether the value from HOSTS or
DNS is used automatically? i know that on some systems, one can specify
to use HOSTS first (ie: USE_HOSTS_FIRST=1 [OS2] or /etc/host.conf
[*nix])... i've seen it in winwhatever once upon a long time ago...


That depends on what API provided by the respective OS. As far as I
understand it correctly, Unix does not provide such functionality in the
basic API (syscalls) but only e.g. in libc (which is in turn used by
nslookup, etc.), so Pascal code (for Unix) not using libc needs to
implement this logic (that's what unit netdb does).


ah... ok... i hadn't yet had a chance to go looking in that unit... trying 
to first complete the email wading for the day ;)


FWIW: if i were to just be hunting and digging, the name of the unit would throw 
me off because it seems to indicate network database functions whereas i 
wouldn't think that DNS lookups and the like are database oriented... not like 
SQL stuff... but i guess the DNS is a form of database, isn't it ;)


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty

On 4/8/2013 11:03, Mark Morgan Lloyd wrote:

How best to get the (internet-style) domain name of a system? GetDomainName()
appears to be returning (none) here on x86 Linux.


do you mean the FQDN (Fully Qualified Domain Name)??


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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty

On 4/8/2013 14:54, Mark Morgan Lloyd wrote:

waldo kitty wrote:

On 4/8/2013 11:03, Mark Morgan Lloyd wrote:

How best to get the (internet-style) domain name of a system? GetDomainName()
appears to be returning (none) here on x86 Linux.


do you mean the FQDN (Fully Qualified Domain Name)??


I mean that on the machine I'm working on the hostname is pye-dev-01 and the
domain name is telemetry.co.uk. I was under the impression that GetDomainName()
should return the latter, but apart from anything else it's unix-only and whilst
Windows is not somewhere I want to go today I'd like a portable solution if
possible.


ok... you are looking for the FQDN, then... the question is how is this machine 
referenced and its FQDN created and maintained... it would seem that you would 
have a DNS server that would return this information... it sounds like your 
machine only has its host name defined and there is nothing else DNS-wise that 
returns the rest of the domain name...


from the machine you are trying to perform this look up from, what do you get if 
you do the following?



nslookup pye-dev-01

nslookup pye-dev-01.telemetry.co.uk


using the last one, i get the message that that machine doesn't exist... of 
course, i'm on the outside and access to this machine may not be allowed from 
outside... not even finding its address...


i don't see this as linux or windows centric... what i'm seeing seems to point 
to a DNS configuration situation... you might be able to handle this with a 
local entry in your HOSTS file...


[crystalball] get nslookup working first. your code should work. [/crystalball]

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


Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty

On 4/8/2013 16:14, Mark Morgan Lloyd wrote:

waldo kitty wrote:

from the machine you are trying to perform this look up from, what do you get
if you do the following?


nslookup pye-dev-01


Server: 192.168.1.1
Address: 192.168.1.1#53

Name: pye-dev-01.telemetry.co.uk
Address: 192.168.1.16


nslookup pye-dev-01.telemetry.co.uk


Server: 192.168.1.1
Address: 192.168.1.1#53

Name: pye-dev-01.telemetry.co.uk
Address: 192.168.1.16


i like those outputs :)


using the last one, i get the message that that machine doesn't exist... of
course, i'm on the outside and access to this machine may not be allowed from
outside... not even finding its address...


As you can see, that's an internal (RFC 1918 IIRC) address.


yup... i kinda figured that was the case...


i don't see this as linux or windows centric... what i'm seeing seems to point
to a DNS configuration situation... you might be able to handle this with a
local entry in your HOSTS file...

[crystalball] get nslookup working first. your code should work. [/crystalball]


OK, that's no big deal. But it looks like GetDomainName() doesn't quite do what
it says on the can :-)


agreed... i was just looking around on my FPC 2.6.0 install and note the 
following from rtl/unix/unix.pp


Function  GetDomainName:String; deprecated; // because linux only.

diggin in, i note that it seems to use the system's uname function... but i 
think that is different than the command line uname or uname -a because none 
of my linux machine return their FQDN in this output... i note that it also 
seems to be pulling this function from a/the libc library...


i note that both, GetDomainName and GetHostName both use the same var (Sysn : 
utsname) but just different fields in what is apparently a record of some type...


can't trace further... the grill and a pork loin are calling me... not to 
mention other mouths in the location wanting some eats soon-ish...

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


Re: [fpc-pascal] File Association and opening with already running app

2013-04-04 Thread waldo kitty

On 4/4/2013 04:08, Graeme Geldenhuys wrote:

Example of what I want to achieve. Say I have gEdit (Gnome editor) open
and have a file loaded. Now if I am in a console and type 'gedit
someotherfile.txt' [or double click a text file in Nautilus], it doesn't
start a new instance of gedit, the existing instance opens the new file
- gedit supports multiple opened files in a tabbed view.

How do they accomplish this? I would like to implement something like
that for fpGUI, and it must work under all fpGUI supported desktop
platforms.


notepad++ does this also... or you can configure it to open multiple times... i 
don't know if you can pick out how notepad++ is doing this from their code... i 
don't know...


http://sourceforge.net/projects/notepad-plus/


this is one case where i like the single process with multiple tabs but i can't 
stand it in my browser(s)...

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


Re: [fpc-pascal] [OT] Re: Feature proposal: function-based assignment operatorst

2013-04-04 Thread waldo kitty

On 4/4/2013 08:11, Sven Barth wrote:

Am 04.04.2013 14:56, schrieb Mark Morgan Lloyd:

Sven Barth wrote:

Am 04.04.2013 13:54, schrieb Lukasz Sokol:

[trim]

So far, not many (i.e. none) comments in favor...

Yes, I've seen that as well...


But it was discussed fairly thoroughly here, and I think that consensus was
positive. Also (Sven) your request was to get it into Mantis pro forma, rather
than for everybody here to use Mantis to vote on its desirability.


But those that commented on Mantis didn't comment to the thread on the mailing
list...


perhaps they should be pointed to the thread so they can catch up?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: HMAC_SHA1 and FPC

2013-04-02 Thread waldo kitty

On 4/2/2013 03:04, Noah Silva wrote:

Haha I was just mentioning one positive benefit.  Also, I am pretty sure Synapse
can use the OpenSSL DLLs.


it does... and on at least three platforms, too... winwhatever, *nix and OS2...

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


Re: [fpc-pascal] newbie question

2013-03-30 Thread waldo kitty

On 3/30/2013 13:38, Marco van de Voort wrote:

In our previous episode, waldo kitty said:

that's the main one that's used when there's no dedicated one for the individual
users... generally speaking, you'd also have ~/.fpc.cfg or such... how this
arrives in ~/ i don't know as i've not (yet) attempted fpc on a *nix system...


Most versions will install in / if you install as root, and keep everything in 
~ if you
install as normal user.


i was thinking about the situations where root does the install and then some 
users actually use it but not root since he's admin only and doesn't have the 
knowledge to write code ;) O:)


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


Re: [fpc-pascal] newbie question

2013-03-29 Thread waldo kitty

On 3/29/2013 17:51, duilio foschi wrote:

I had somebody install fpc and brook framework into my linux server (as probably
I would not had been able to do it)

Then I  tried to compile the first 'hello world' example of the brook framework.

Soon I discovered that

- fpc configuration file is called /etc/fpc.cfg


that's the main one that's used when there's no dedicated one for the individual 
users... generally speaking, you'd also have ~/.fpc.cfg or such... how this 
arrives in ~/ i don't know as i've not (yet) attempted fpc on a *nix system...


sorry i can't help with the rest...
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How To write an enumerator for trees

2013-03-21 Thread waldo kitty

On 3/21/2013 09:59, Xiangrong Fang wrote:

I am not creating a new thread, but just replied it.


your post did not contain a references control line pointing to the post you 
were replying to... that breaks the linking and it won't be placed in the tree...


my 2 centavos...


My question is about
algorithm not syntax.  I will try the sample program by Kyan.

Thanks.


2013/3/21 Michael Schnell mschn...@lumino.de mailto:mschn...@lumino.de

I have read this. My question is not about how to write enumerator, but
how to do this for TREEs


Xiangrong Fang: Please anser to a message instead of creating a new thread !

There might be no necessary sort order of a tree.

So you first need to invent a usable sort order and set up the enumerator
accordingly. An Enumerator can work on any sort order it only needs to be
strict.
Regarding performance it is essential to use a sort order that allows for
quickly finding the elements one after the other.

-Michael



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


Re: [fpc-pascal] Case based on type

2013-03-01 Thread waldo kitty

On 3/1/2013 17:57, Sven Barth wrote:
[...]

Alternatively if you don't need to check the hierarchy, but can live with an
exact match you can do this:

=== example begin ===

procedure checkLibrariesAndConnect(db: TSQLConnection);
begin
case LowerCase(db.ClassName) of
// Note: .ClassName won't work here
'TPQConnection': ...;
'TIBConnection': ...;
end;
end;



is there a bug here? i would expect LowerCase(anything) to return all lower 
case characters... that means that 'TPQConnection' would not match since it 
contains uppercase characters...


what am i missing?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] differences between .pp and .pas files

2013-02-25 Thread waldo kitty

On 2/25/2013 00:34, Eric Kom wrote:

Good day,

Please what is a difference between .pp and .pas files extension?


IIRC, pp is objectpascal whereas pas is general pascal...


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


Re: [fpc-pascal] Re: differences between .pp and .pas files

2013-02-25 Thread waldo kitty

On 2/25/2013 02:31, silvioprog wrote:

2013/2/25 Reinier Olislagers reinierolislag...@gmail.com
mailto:reinierolislag...@gmail.com

On 25-2-2013 6:34, Eric Kom wrote:
  Good day,
 
  Please what is a difference between .pp and .pas files extension?

As Ralf said: 2 letters. I have the idea .pp was used in the past to
differentiate from other Pascal compilers, while .pas is used more
commonly now.

Groete,
Reinier


... and, .pas is commonly found code of units (e.g.: yeahbaby.pas - unit
yeahbaby;); .pp is commonly found code that generates the executable (e.g.:
ohgod.pp - program ohgod;).


i like that! hahehehe... in my experience with lazarus projects, it is the lpr 
file that generates the executable but that also depends on the project settings 
which may specify a different name for the executable...


for instance:
DOS: foo.exe
OS2: foop.exe
WIN: foow.exe
LNX: fool.exe or just foo or fool

;)

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


Re: [fpc-pascal] OT a bit - Planet Object Pascal

2013-02-18 Thread waldo kitty

On 2/18/2013 02:40, Florian Klämpfl wrote:



waldo kittywkitt...@windstream.net  schrieb:


On 2/17/2013 14:35, Florian Klämpfl wrote:

Am 17.02.2013 20:31, schrieb Frank Church:

One more thing lest I forget. The official FPC documentation is very
good, especially for documents created by volunteers and hobbyists.
That it is not accompanied by examples


c:\fpc\docsdir ex*.pp /s | grep -c ex
668

What do I miss?


they are not /in/ the documentation


They are...


i'll have to look again... i honestly haven't seen them listed in any of the 
documentation pages i've printed...


but perhaps we're also speaking of semantics? i will go back and look further... 
my apologies if i'm incorrect and the sources with explanations are actually in 
the pages i've not printed...

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


Re: [fpc-pascal] OT a bit - Planet Object Pascal

2013-02-17 Thread waldo kitty

On 2/17/2013 04:45, Sven Barth wrote:

Am 16.02.2013 22:14 schrieb Michael Van Canneyt mich...@freepascal.org:
  True. But I think Florian (or my) time is better spent on actaul coding.
  Let people that like blogs do the blogging.
 
  They're almost certainly going to be better at it.

I'm doing feature announcements. That can be nearly considered as blogging :)


post them in a blog and it /is/ blogging ;)

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


Re: [fpc-pascal] OT a bit - Planet Object Pascal

2013-02-17 Thread waldo kitty

On 2/17/2013 12:44, Michael Van Canneyt wrote:

What I (and Florian) are trying to say is that our limited time is better spent
on coding than on spreading the news of FPC. But no-one is stopping you from
spreading the news, on the contrary. We'll be glad that you do, because it means
you think FPC is worth the effort.

Trying to convince us to spread the news, however, is wasted effort.


i know exactly this feeling... it is like doing custom programing... i can/will 
do that and those contracting it will pay me for that development... i won't 
write it and then try to make money selling it so they can get it for less 
cost... they can recoup their costs for development by reselling it themselves...


pretty much the same... i'm not a marketer or a salesman... i will sell you 
something i have if you come to me looking for it but i won't cold call you or 
shove it in your face trying to get you to buy it...

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


Re: [fpc-pascal] OT a bit - Planet Object Pascal

2013-02-17 Thread waldo kitty

On 2/17/2013 14:35, Florian Klämpfl wrote:

Am 17.02.2013 20:31, schrieb Frank Church:

One more thing lest I forget. The official FPC documentation is very
good, especially for documents created by volunteers and hobbyists.
That it is not accompanied by examples


c:\fpc\docsdir ex*.pp /s | grep -c ex
668

What do I miss?


they are not /in/ the documentation to be read with the docs... think about it 
like a programming book you by at the store... you are reading a chapter about 
pointers and there's a simple working demo included in the chapter that is 
expanded on the further you read in the chapter...


that the sources for the demos are on the disk is a GoodThingtm because that 
saves the reader from having to type them in... however, that they are on the 
disk and not in the documentation also means that the reader cannot look at and 
contemplate them while reading the (printed) documentation while in the 
library with their C0FFEE while taking their morning/daily 
constitutional... or at the breakfast table or on the bus or train or even 
just while reading in bed...


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


Re: [fpc-pascal] OT a bit - Planet Object Pascal

2013-02-17 Thread waldo kitty

On 2/17/2013 19:40, Rainer Stratmann wrote:

Am Sunday 17 February 2013 18:45:50 schrieb Florian Klämpfl:

Am 17.02.2013 18:10, schrieb ik:

Nice, Pascal is at the same level of usage and exposure as gcc, Linux
kernel and llvm,


And you think some fancy webpage filled with java script (which is
turned off in my browser) would change this?


In my opinion it would be ok to make the webpage a little bit more eyecandy.


eyecandy isn't worth any more than regular candy... candy is candy which is only 
a sweet to attract those who can't/won't stomach the reality of the basics...


  a spoon full of sugar helps the medicine go down...


That can be done also without java script(!)


agreed... but too many are wrapped up in making candy to suck on rather than a 
real meal that actually satisfies the hunger...


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


[fpc-pascal] JSON coders beware...

2013-02-07 Thread waldo kitty


i just saw this in my latest copy of @RISK and thought i'd share it since there 
seem to be quite a few coders using JSON...


http://www.reddit.com/r/netsec/comments/17xzlw/why_does_google_prepend_while1_to_their_json/

not knowing others' level of security awarness or what data they are 
transferring via JAON, i just thought it prudent to make this post ;)

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


Re: [fpc-pascal] what happened to the contributed units listing?

2013-02-07 Thread waldo kitty

On 2/7/2013 07:50, Michael Van Canneyt wrote:

On Thu, 7 Feb 2013, José Mejuto wrote:

Please, add some kind of notification that the page (and maybe others) need
javascript enabled to be displayed. I thought that the page was empty :(


I didn't imagine there are still people who disable javascript in their 
browser...


FWIW: i don't specifically disable it but it is blocked by my protections... 
especially if it comes from a different domain than the page it on...



These days, about the half of internet does not work without Javascript enabled
in the browser.


good thing that no one visits that half of the internet ;) :P :mrgreen:

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


Re: [fpc-pascal] Favourite Pascal books

2013-01-22 Thread waldo kitty

On 1/22/2013 06:52, Leonardo M. Ramé wrote:

The best introductory Turbo Pascal book I've ever read was Mastering Turbo Pascal 
6 from Scott D. Palmer spanish edition,


i've got one with that very same title but written by Tom Swan... the one i have 
is the paperback, fourth edition - third printing 1993... 1037 pages...


ISBN: 0-672-48505-2
LCCCN: 91-61702

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


Re: [fpc-pascal] converting a TP/BP library to FPC

2012-12-06 Thread waldo kitty

On 12/5/2012 23:53, Chad Berchek wrote:

Perhaps it would be sufficient to supply the time value from another source
converted to the units the other code is expecting to see. Assuming the
frequency for the BIOS timer is about 18.2 Hz:

function TimeCounter: LongInt;
begin
Result := LongInt(Round(GetTickCount * 18.2065 / 1000));
end;

wherein GetTickCount is a function returning a value in milliseconds.


this is pretty much what i have thought about doing...


However you'd have to be careful of the overflow wrap around and see if the
old code can handle it.


that routine follows... it doesn't seem to be all that fancy, though...

Function TimeOut(Time:LongInt):Boolean;
  Var
TimeDiff: LongInt;

  Begin
  TimeDiff := Time - TimeCounter;
  If TimeDiff  0 Then
TimeOut := True
  Else
Begin
If (TimeDiff  78) Then
Dec(TimeDiff, 1572480);
If TimeDiff  0 Then
  TimeOut := True
Else
  TimeOut := False;
End;
  End;




On 12/5/2012 6:25 PM, waldo kitty wrote:


Var
TimeCounter: LongInt Absolute $40:$6C;

FPC tells me the following...

MKDOS.PAS(14,36) Fatal: Syntax error, ; expected but : found

i know this is using direct access to the timer ticker from the BIOS but
at this time, i don't know how to best handle it in FPC...


___
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] converting a TP/BP library to FPC

2012-12-05 Thread waldo kitty


w2k with FPC 2.6.0 release using lazarus 1.1 only as an editor... no GUI 
stuffings at all... i'm using -Mtp in the project options...


i have finally gotten around to trying to convert the old FTN/BBS MKSMG library 
to FPC... it was written for DOS TP/BP and has defines for windows which i 
assume is the early delphi... this is a first run at this and i'm only working 
with a project file that contains all the units in the uses clause...


currently i'm taking the easiest way out with IFDEF FPC to define within the 
IFDEF WINDOWS blocks using the DOS format for most things and using the FPC 
DOS unit... but i've run into something i don't know how to handle...


Var
  TimeCounter: LongInt Absolute $40:$6C;

FPC tells me the following...

MKDOS.PAS(14,36) Fatal: Syntax error, ; expected but : found

i know this is using direct access to the timer ticker from the BIOS but at this 
time, i don't know how to best handle it in FPC...


this is not used in the current BBS message base library code that i'm working 
with but it is a routine that is used in other portions of the BBS library 
code... in the current unit, MKDOS, it is only used in a routine to determine if 
there's been a timeout indicating user inactivity for users that were logged 
into the bbs... as i say above, this is not a routine used in the message base 
code which is currently my main concern in getting ported to FPC...


so how should i handle this?

PS: i saw a notation in some FPC code that Mark May had ported whatever unit i 
was looking at to linux and then it was further enhanced by another 
individual... i don't know if Mark is still reading these FPC lists or not, 
though... i haven't seen anything indicating that the MKSMG sources have been 
ported to FPC, either... so i may be reinventing the wheel if this work has 
already been done... at least i'm getting plenty of practice typing {$IFDEF 
FPC}, {$ELSE} and {$ENDIF FPC} ;)


PPS: sorry if this is rambling... today is my birthday and i'm also celebrating 
that, such as it is -=B-)

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


[fpc-pascal] problem with command line defines??

2012-11-28 Thread waldo kitty


on OS/2 eCS2 i have fpc 2.6.0 release installed... i've been working with a 
library and needed to create a define so that some code would be compiled that 
otherwise is not... since i have to compile from the command line with fpc, i 
compiled my project like this...


  fpc -dOS2GCC testhttp

and it did compile with the defined code block... later, i wanted to test 
without that defined code block so i compiled again like this...


  fpc testhttp

but the library wasn't recompiled... i had to manually remove the *.O and *.ppu 
files to get it recompiled without the defined code block...


why?

the time between compilation and testing attempts was less than one minute... 
would this have something to do with this problem?

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


Re: [fpc-pascal] problem with command line defines??

2012-11-28 Thread waldo kitty

On 11/28/2012 13:55, Tomas Hajny wrote:

On Wed, November 28, 2012 19:39, Jonas Maebe wrote:

Changing defines does not cause recompilation of units because e.g. the
defines required to compile the FPC RTL or packages are completely
unrelated to any defines that may or may not be required for compiling
your program. In general, requiring you to specify all defines used for
every unit you use in a program would result in an unmaintainable
situation.

Additionally, there are some practical difficulties with adding hints for
indicating such situations, see
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/fppu.pas?annotate=22452#l659


In other words - it is normal, but you can solve it without manually
deleting the created *.o and *.ppu files by using the -B parameter (which
asks fpc to rebuild all units for which it has sources with the new
command line parameters including conditional defines provided on the
command line).


ahhh... i see a script coming like i use with my TP/BP stuff when i compile from 
the command line... thanks to both of you for the answer...


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


Re: [fpc-pascal] problem with command line defines??

2012-11-28 Thread waldo kitty

On 11/28/2012 13:55, Tomas Hajny wrote:


In other words - it is normal, but you can solve it without manually
deleting the created *.o and *.ppu files by using the -B parameter (which
asks fpc to rebuild all units for which it has sources with the new
command line parameters including conditional defines provided on the
command line).


haHA! yes! that fixed another problem we spoke of recently... now i /can/ get 
both sets of DLLs loading via the define... the -B was needed to rebuild both 
.pas files using the define... [digress] but the same problem is still there 
with that project :? if i can just get more responses on the synapse list, life 
might be better sooner rather than later ;) [/digress]


now i just have to remember to use -B every first time i compile and then do not 
use it the second time which is required to get around the doubled path 
problem when linking... at least, until FPC 2.6.1 finally gets out the door...


it would make a nice birthday present if it were to appear within the next 7 
days OB-)  :lol:

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


Re: [fpc-pascal] Free Pascal 2.6.2 rc1

2012-11-27 Thread waldo kitty

On 11/27/2012 17:48, Bart wrote:

So, to make a long story short, I just need the installer to be Win9x
compatible, the current rc1 does not need any special build as far as
I am concerned.


FWIW: the installers have been, in recent times, the problem with many software 
packages... for instance, adobe flash on w2k... the installer won't run because 
of a missing dll export... this particular export has to do with loading from a 
certain path...


there are two ways around the problem... one can patch (actually hex edit) the 
installer executable to call the old routine (which is parameter compatible and 
fits in the same name string space) OR one can install a replacement forwarder 
kernel which provides the new calls and passes the existing ones on back to the 
original kernel...


in either case, adobe flash still runs just fine on w2k without and 
modifications or forwarding kernel in place... in fact, the only place that 
the forwarding kernel is needed is in the special directory that you perform 
the install from... other than that, the rest of the OS doesn't have a clue 
about it...


so i say BOO! to the installer groups that are forcing designed 
obsolesce where it is not necessary...

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


Re: [fpc-pascal] synapse and OS/2

2012-11-11 Thread waldo kitty

On 11/11/2012 07:05, Tomas Hajny wrote:

On 10 Nov 12, at 20:29, waldo kitty wrote:


before i get too much further along on this project, i guess i should ask about
the ssleay32 and libeay32 libraries on OS/2...

i'm developing this project on windows with the ultimate goal of copying the
source files over to my OS/2 (eCS2) box and compiling it there with FPC... i
have another project that uses only about four of the synapse39 files and they
required some modification to compile on OS/2 with EMX... i'm concerned that i


Have you submitted your OS/2-specific changes to the Synapse
developer so that they could be included in the project for future
versions?


i didn't make them... someone else did to help me with compiling on OS/2 with 
EMX... i will have to dig back into my saved messages to locate what they sent 
me and who it was... basically all they did was to add a few $IFDEF for OS/2... 
they also created one pas file with some initialization routines...


i can send what i have but i don't know where to send to... plus, these are only 
the 4 or 5 files that my one project needed for mime translation stuffs...



may run into the same problem with synapse40 as well as not being able to have
the needed ssleay32 and libeay32 files for accessing https sites...

  .
  .

I don't have direct experience with using Synapse (under OS/2 or
otherwise), but two more general comments:


hummm... i'm hoping that i won't run into a wall with this :/


- If these libraries are supposed to come from OpenSSL, I've found a
note in some Internet discussions that libeay32.dll is name used in
the Windows port of OpenSSL for libcrypto (available for OS/2 as
either crypto.dll or kcrypto.dll/kcrypt10.dll - see my second note
below) and similarly ssleay32.dll is Windows specific name for libssl
(available for OS/2 as either ssl.dll or kssl.dll/kssl10.dll).


ahh... all i know is that they were referenced as being needed for accessing 
https sites... without them, even with one of the specified ssl plugins, ssl 
still wouldn't work...



- OpenSSL is available for OS/2 in at least two flavours / ports. One
of them uses the original libc port created with EMX (emxlibc.dll).
This port for OpenSSL 0.9.7a is available on Hobbes
(http://hobbes.nmsu.edu); I don't know whether there is similar EMX
port/binary available for a later OpenSSL version.


cool! that may be what i'll need to use... that plus whatever code changes to 
synapse to load them... i do not recall if synapse has any OS/2 related defines 
or code... i don't recall seeing any notation of such in the docs or synapse 
code that i've looked at... everything seems to only state windows and linux...


maybe one of the first things to do is for me to get the files and extra init 
code to someone who knows what they are doing and then let's see if one can get 
all of synapse to compile on OS/2 with FPC by starting off with the blcksock unit...



In addition, there are builds using kLibC (libc06*.dll - in particular
libc063.dll) which is a more recent libc port included with the latest
GCC ports for OS/2.


currently, all my FPC compiles are configured to use EMX because that's what i'm 
familiar with... i do have those libc files for a couple of other tools, though...



These ports were provided by some Japan user. An older
version based on OpenSSL 0.9.8n is also available on Hobbes, but the
latest builds are only available from his website
(http://bauxite.sakura.ne.jp/software/os2/#openssl; the URL included
with the build on Hobbes is not valid any longer). Notes on his page
indicate that it should be still possible to compile OpenSSL with the
original EMX GCC but there is no binary provided for this on that
page. Now - which version to use probably depends on whether you need
to use other libraries using libc or not. If you do, you should
probably use the same libc version also for openssl. If you don't,
you can probably choose either of them (although I assume that the
later version might be better protected from attacks).


i think i understand... i'll sleep on it and see if a fully grok it on the 
morrow after i get up...



Hope this helps


it beats sloughing thru it all getting it to work with the barest of examples 
like i've been having to do... the docs are ok telling what something does but 
there are no example in the docs on how to do or use the routines... one such 
example is a note about having to prepare the POST vars and contents the same 
way one would prepare them for a GET but no where was anything offered that 
actually showed such... i took a wild guess and came up with a routine that 
works... it is based on storing the var names and their values in two arrays and 
then counting thru them but if i had no clue how they were supposed to be formed 
in the first place... well...


)\/(ark
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] synapse and OS/2

2012-11-10 Thread waldo kitty


before i get too much further along on this project, i guess i should ask about 
the ssleay32 and libeay32 libraries on OS/2...


i'm developing this project on windows with the ultimate goal of copying the 
source files over to my OS/2 (eCS2) box and compiling it there with FPC... i 
have another project that uses only about four of the synapse39 files and they 
required some modification to compile on OS/2 with EMX... i'm concerned that i 
may run into the same problem with synapse40 as well as not being able to have 
the needed ssleay32 and libeay32 files for accessing https sites...


what i have works fine, so far, on windows... i actually have two or three 
different compiles of the windows ssleay32 and libeay32 dlls and the first one i 
chose to use worked with my project... at least i was able to access the site 
for the login without getting an error 500 back and i did get the initial 
redirect page that they show after a successful login :)


all that said, i've also noticed that my synapse39 and synapse40 files still 
have 38 set as the synapse version in the blcksock.pas file... seems that 
someone hasn't completed all the updates needed???

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


[fpc-pascal] adding additional libraries

2012-11-09 Thread waldo kitty


when you add additional libraries to your FPC and/or Lazarus installation, how 
do you normally do it? where do you normally place them?


i'm thinking of libraries like synapse, fpGUI, tiOPF and similar...
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] adding additional libraries

2012-11-09 Thread waldo kitty

On 11/9/2012 16:42, Graeme Geldenhuys wrote:

On 2012-11-09 19:53, waldo kitty wrote:


when you add additional libraries to your FPC and/or Lazarus installation, how
do you normally do it? where do you normally place them?


Do you mean your directory layout on your hard drive?


yes, sorry...

currently i have something like this...

\freepascal\
\freepascal\binutils\  latest release of ppc386.exe and i386-win32 directory
\freepascal\fpc\
\freepascal\fpc\2.6.0\ svn sources and compiled version
\freepascal\laz\   svn sources and compiled version
\freepascal\libs\  considering this for add-on libraries
\freepascal\libs\synapse39 eg: for synapse release 39
\freepascal\libs\synapse40 eg: for synapse release 40
\freepascal\projects\  projects hierarchy directory

i know that some of these libraries have lazarus packages... i don't want to get 
them mixed up with the FPC and/or Laz sources from svn and have problems there 
if i have to wipe those directories to start all over like i've had to do in the 
past... plus i don't always use lazarus for my editor... the big thing is that i 
also copy some projects over to my OS/2 box and compile over there with fpc 
directly so everything has to be the same on both boxes as far as the directory 
layout goes...


is that better? ;)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] secure REST client?

2012-11-08 Thread waldo kitty


i'm looking at creating a REST web application client... nothing fancy... 
command line oriented... fire it up, it logs into the website and performs the 
REST queries saving the output to named files...


i have no clue where to start looking in the FPC documentation or any existing 
libraries... i have toyed with something using fpweb that would pull some pages 
from a site for scraping but that idea is no longer being considered...


firstly i'm not sure how to go about doing the login ops with cookies and 
such... the site gives some assistance and examples for using wget and curl but 
i think i'd prefer to handle this in my client... currently there's a normal 
login on an existing non-REST site and then there's a new method of login on the 
REST site... i haven't been able to figure out how to convert my fpweb client so 
that it properly logs in and retains the login so that subsequent queries will 
work...


this is extremely new territory for me coming from TP6/7...

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


Re: [fpc-pascal] secure REST client?

2012-11-08 Thread waldo kitty

On 11/8/2012 17:11, Michael Van Canneyt wrote:



On Thu, 8 Nov 2012, waldo kitty wrote:



i'm looking at creating a REST web application client... nothing fancy...
command line oriented... fire it up, it logs into the website and performs the
REST queries saving the output to named files...

i have no clue where to start looking in the FPC documentation or any existing
libraries... i have toyed with something using fpweb that would pull some
pages from a site for scraping but that idea is no longer being considered...


Why not ?


mainly because the data is better gathered from the other site with REST... no 
need to screenscrape from there or have to deal with a lack of data because the 
1st site hasn't gathered it ;)



firstly i'm not sure how to go about doing the login ops with cookies and
such... the site gives some assistance and examples for using wget and curl
but i think i'd prefer to handle this in my client... currently there's a
normal login on an existing non-REST site and then there's a new method of
login on the REST site... i haven't been able to figure out how to convert my
fpweb client so that it properly logs in and retains the login so that
subsequent queries will work...


I have done this in several projects using fpweb (specifically fphttpclient).
Usually it is simply a matter of retaining some cookies.


you should recall my recent foray into using that code... i had asked about 
persistent connections because mine weren't completing until i included headers 
to state the connection was to be closed...



if you give more details, maybe I can offer more help ?


i'm not sure what to give... i have no clue how to gather cookie data and send 
it back based on the existing example(s) that i've seen :(


i do know that i was unable to use the REST site's sample wget cookie stuff make 
requests to the normal login site... i don't know how to state that properly 
since i'm not sure how either site is really working in this aspect... i only 
know that the cookie stuff apparently didn't work as described by simply 
changing the site address from one to the other...

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


Re: [fpc-pascal] secure REST client?

2012-11-08 Thread waldo kitty

On 11/8/2012 22:15, Виктор Матузенко wrote:

Ккк


what? i don't understand how this is related to my query :? :(


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


Re: [fpc-pascal] OT: Creating a site to contain Pascal units, libraries etc

2012-10-30 Thread waldo kitty

On 10/29/2012 20:04, ik wrote:

* I sent it originally for FPC-Others, but it does not appear there
even in the archive


FWIW: it showed up here in fpc-other when you first posted it...
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] collection memory usage...

2012-10-27 Thread waldo kitty


i'm trying to figure out the best numbers to use for setting up a sorted 
collection... i'm just not understanding the numbers i'm getting from the 
heapdump unit at the end of the run...


i have two collections (/details at the end/)... these collections can be pretty 
large (~4 entries for one collection, ~2 for the other)... using the 
*exact same data* in both cases, if i use this code to set them up...


  aTLEColl:= New(PTLEColl, Init(16384,64));
  aSatCatColl := New(PSCColl, Init(16384,64));

i get numbers like this (from the heapdump)

  Heap dump by heaptrc unit
  8205341 memory blocks allocated : 333112907/357222392
  8205341 memory blocks freed : 333112907/357222392
  0 unfreed memory blocks : 0
  True heap size : 720896 (208 used in System startup)
  True free heap : 720688

but if i use this code to set up the collections...

  aTLEColl:= New(PTLEColl, Init(1,1));
  aSatCatColl := New(PSCColl, Init(1,1));

i get numbers like this (from the heapdump)

  Heap dump by heaptrc unit
  8260386 memory blocks allocated : 3874244611/3898464904
  8260386 memory blocks freed : 3874244611/3898464904
  0 unfreed memory blocks : 0
  True heap size : 262144 (208 used in System startup)
  True free heap : 261936

*if i'm reading this properly*, what is confusing me is the first one allocates 
less memory blocks and uses more heap whereas the second one allocates (a lot) 
more memory blocks (55000 more??) but uses much less heap...


so i'm trying to figure out the best set of init numbers for the collections... 
i'm wanting the fastest run time with the smallest memory usage... am i 
understanding this correctly??




*collection details if needed*

  PSCColl= ^TSCColl;
  TSCColl= object(TSortedCollection)
 Function Compare(Key1,Key2:Pointer):sw_integer; virtual;
 Function KeyOf(Item:Pointer):Pointer; virtual;
 Procedure Insert (Item:Pointer); virtual;
   end;
  PTLEColl   = ^TTLEColl;
  TTLEColl   = object(TSortedCollection)
 Function Compare(Key1,Key2:Pointer):sw_integer; virtual;
 Function KeyOf(Item:Pointer):Pointer; virtual;
 Procedure Insert (Item:Pointer); virtual;
   end;

PSCColl contains these...

  PSCRec = ^TSCRec;
  TSCRec = object(TObject)
 catnbr   : Tcat_nbr;
 satname  : Tsat_name;
 inorbit  : boolean;
 constructor Init(cnbr,sname:string; iorbit:boolean);
 destructor Done; virtual;
   end;

PTLEColl contains these...

  PTLERec= ^TTLERec;
  TTLERec= object(TObject)
 satname  : Tsat_name;
 satdata1 : Tline_data;
 satdata2 : Tline_data;
 catnbr   : Tcat_nbr;
 epoch: double;
 constructor Init(sname,sdata1,sdata2,cnbr:string; 
edate:double);
 destructor Done; virtual;
   end;


they hold these data types...

  Tcat_nbr   = pstring;   // 5 characters
  Tsat_name  = pstring;   // 24 characters
  Tline_data = pstring;   // 69 characters

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


Re: [fpc-pascal] collection memory usage...

2012-10-27 Thread waldo kitty

On 10/27/2012 16:23, Tomas Hajny wrote:
[trim]

*if i'm reading this properly*, what is confusing me is the first one
allocates less memory blocks and uses more heap whereas the second one
allocates (a lot) more memory blocks (55000 more??) but uses much less
heap...


The number of blocks is higher in the second case because a new memory
block is allocated for each record added to the collection (initial
collection size is 1, the size is increased by one record whenever the
allocated size is fully used and a new record shall be added).


ahhh... ok, so that's number of records to start with and number of records 
to increase by...



However, I'm not clear why you think that less heap is used in the
second case?


because true heap size is different between them... i am thinking that this is 
the total amount of heap used by the program during its run??



so i'm trying to figure out the best set of init numbers for the
collections...
i'm wanting the fastest run time with the smallest memory usage... am i
understanding this correctly??


Considering the number of records you suggested above, I'd go for
something like 2 records as the initial collection size and e.g. 2000
or even 5000 as the increment.


ok... i'll give that a try and see what happens... thanks very much for your 
response!


FWIW: i had asked this some several months back but was probably not as clear in 
my request... it may have also been in the wrong area but i didn't get any 
response to it so i just left it alone to ask later ;)

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


Re: [fpc-pascal] fphttpclient close connection?

2012-10-16 Thread waldo kitty

On 10/16/2012 02:36, michael.vancann...@wisa.be wrote:



On Mon, 15 Oct 2012, waldo kitty wrote:



i've noted that fphttpclient has a DefaultTimeout of 15 minutes... how can i
close the connection after all data is received?


That should happen by itself ? Keeping the connection open is currently not
supported.


oh... ok... when i get a URL, the program sits long after the file has 
arrived... i assume it is stuck or something in the GET routine... i've been 
having to CTRL-C to stop the program and i don't see the returned headers at 
that point... the output file is properly written...


when i

  AddHeader(fieldConnection,'close');

it terminates the GET as soon as the file has arrived and the headers are 
shown... the server being tested against has keep-alive on by default...



The DefaultTimeOut is definitely not a property of the http client.


i thought it was used in some routines for connecting and receiving data... my 
bad...


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


Re: [fpc-pascal] set useragent in fphttpclient?

2012-10-15 Thread waldo kitty

On 10/15/2012 17:06, Michael Van Canneyt wrote:

On Mon, 15 Oct 2012, waldo kitty wrote:

i've tried various WAGs like

RequestHeaders(fieldUserAgent,'my user agent');
RequestHeaders('User-Agent','my user agent');
SetRequestHeaders(fieldUserAgent,'my user agent');
SetRequestHeaders('User-Agent','my user agent');


Try
AddHeader('User-Agent','My user agent');

as in

With TFPHTTPClient.Create(Nil) do
try
AddHeader('User-Agent','Mozilla/5.0 (compatible; fpweb)');
Get(ParamStr(1),ParamStr(2));
Writeln('Response headers:');


thanks... that works! :)

i knew it would be something simple that i just hadn't seen or wrapped my head 
around...

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


[fpc-pascal] fphttpclient close connection?

2012-10-15 Thread waldo kitty


i've noted that fphttpclient has a DefaultTimeout of 15 minutes... how can i 
close the connection after all data is received?


the server is configured to keep-alive.

AddHeader(fieldConnection,'close'); works but i want/need to use keep-alive 
and then close the connection afterwards instead of waiting for the program to 
timeout in 15 minutes or when the server closes the connection...


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


Re: [fpc-pascal] windres not required/provided by Debian 2.6.0 FPC

2012-10-09 Thread waldo kitty

On 10/8/2012 03:12, Tomas Hajny wrote:

The manual forgets to mention that this is only the case on Win32 (where
the various GNU tools and utilities are included with the FPC installation
package). It also doesn't mention that different resource compilers may be
used on other platforms (e.g. gorc on Win64, etc.).


i've run into resource problems when compiling projects from win32(?) to OS2... 
on OS2, i have to use fpc directly... everything is developed on win32(?) 
[w2000pro or vista] and then copied to the OS2 machine to compile the 
project.lpr... currently i'm using EMX on the OS2 box and i always get an error 
on the resource file unless i simply comment it out (with a '.' as the second 
character)...


how can i handle these resource files on OS2?

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


Re: [fpc-pascal] Re: Editing resource of executable

2012-09-01 Thread waldo kitty

On 9/1/2012 02:56, Mark Morgan Lloyd wrote:

waldo kitty wrote:


Of course, an even safer way would be to leave the executable alone and to put
an early check in the startup code that a subsidiary key file existed, and for
that key to include something that identified the machine or site on which the
program was entitled to run.


true... but as i recall, one of the goals of this capability was to not have
extra files laying about... i remember the days of dongles and never liked
them at all...


Oh yes. And all those copy-protection systems that transferred a token from a
floppy to a file on disc.


yup! plus there were also those floppy and some CD based ones that insisted on 
the floppy or CD being in the drive so they could check for a specific flaw or 
data in a specific place that couldn't normally be read by standard tools...



But if the choice was between having an extra file or patching the executable,
and if the patched executable failed on 5% of customer systems due to an OS or
anti-virus check, I'd settle for the extra file and count myself lucky.


agreed... i run an old(er) firewall product that performs MD5 checksums on all 
executable files so that it can alert when a file has changed since its last 
execution... when i'm updating lazarus from SVN, i like that this firewall pops 
up a box alerting me when svn2inc, fpmake, and a few others change during the 
build... this lets me know, without having to go hunting, that my new stuff is 
up to date... or, at least i think it is... the process will hold everything 
until i acknowledge the file update... it gets in the way sometimes but more 
often than not, i'm happy to see its alerts...

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


Re: [fpc-pascal] Editing resource of executable

2012-08-31 Thread waldo kitty

On 8/29/2012 17:46, Krzysztof wrote:

Hi,

I have some problem. Example:

I created some exec using free pascal and lazarus. It is placed on
http server. User in webbrowser click download, and server should
attach link from where it is clicked into this exec. So when user run
downloaded exec, this exec can read this link. The idea is that
everything is in one file (and must be). My question is, exists any
commandline tool which can edit executable file for edit some resource
(like ResEdit or Restorator for Windows) which can be used by http
server? By resource I mean some const (or resourcestring section, free
pascal binary can replace it in runtime, can some tool do this same
outside?). So main problem is in server side. Finally we can use free
pascal compiler and compile modified source by server, but this
solution we use when everything fails (admins, restrictions etc.). I
need this only for windows (for now), so I'm considering some
commandline installer makers like InnoSetup or something. Any idea?


i think i know what you are asking for and my thought actually matches what mark 
loyd seemed to be saying... with that in mind, i remember reading about some 
sort of resource editor to allow editing of resources in a binary... it was 
posted in this area back in jan 2012... i don't know if this is what you are 
looking for but here's what i found...


[QUOTE]
Date: Mon, 30 Jan 2012 09:09:42 +0100
From: Reinier Olislagers reinierolislag...@gmail.com
To: FPC Mailing list fpc-pascal@lists.freepascal.org,
Lazarus mailing list laza...@lists.lazarus.freepascal.org
Subject: [fpc-pascal] Poor man's resource code available and CheckRide update: 
now with editor


Hi all,

(Cross posted to Lazarus+FPC lists)

Thanks to UPayload (http://www.delphidabbler.com/articles?article=7) and some 
help on the forum, I could implement an alternative way of storing files in an 
executable file (basically it just appends them with a footer). See source: 
poormansresource.pas in https://bitbucket.org/reiniero/checkride/src/, and the 
CheckRideResourceZipper project for sample code


This method allows me to edit such a resource using an FPC/Lazarus program. As 
- I think - DoDi predicted, I had a lot of trouble trying to work with regular 
Windows resources, but whether that is due to bugs in FPC, Windows or me, I 
don't know ;)


I updated my CheckRide remote control package with this functionality: a helper 
can edit CheckRide.exe with his hostname and port number and distribute that 
single exe to his clients/helped persons. This allows 1 click operation at the 
helped side.


I also tested operation with a Linux helper running stunnel+vncviewer and a 
WIndows helped party running CheckRide.exe


See the site mentioned above.

Comments, patches, as well as criticism welcome ;)

Thanks,
Reinier
[/QUOTE]

if i'm reading the above correctly, it would appear that it can possibly do what 
you are looking for... maybe...

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


Re: [fpc-pascal] Re: Editing resource of executable

2012-08-31 Thread waldo kitty

On 8/31/2012 11:55, Reinier Olislagers wrote:

On 31-8-2012 17:48, waldo kitty wrote:

if i'm reading the above correctly, it would appear that it can possibly
do what you are looking for... maybe...

I'd say it can definitely do what he's asking for - but I'm biased:


as well you should be :)


you did notice the guy posting that message is me? And that I again posted
the link to my CheckRide code project in this thread? ;)


yup... i've been jumping back and forth thru several things while catching up on 
my emails...



Thanks for looking up that post and kudos to your memory of ancient threads.


you are welcome and thanks :)

your original posting and Krzysztof's reminded me so much of what i use in some 
of my TP6 stuff... but what i use is slightly different in that it uses typed 
constants and modifies them in the executable during execution...


one purpose of this would be to limit the execution of a trial program to only X 
executions or that it will only run for Y days after it is first executed or 
even a combination of those such that only X executions are allowed within Y 
days and if either is reached, then the program stops...


i also used this technique to store registration data and options settings 
directly in the executable instead of having a separate and external 
configuration file...


i can post those old sources if anyone is interested... they only need ask... 
the sources are dated May 1993 and i likely saved them from the Fidonet PASCAL 
echo (message area)... they might have even ended up in the SWAG archives but i 
don't know ;) -=B-)


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


Re: [fpc-pascal] Re: Editing resource of executable

2012-08-31 Thread waldo kitty

On 8/31/2012 16:18, Mark Morgan Lloyd wrote:

waldo kitty wrote:


i also used this technique to store registration data and options settings
directly in the executable instead of having a separate and external
configuration file...

i can post those old sources if anyone is interested... they only need ask...
the sources are dated May 1993 and i likely saved them from the Fidonet PASCAL
echo (message area)... they might have even ended up in the SWAG archives but
i don't know ;) -=B-)


I did this sort of thing back in the days of MZ files, where there was a simple
length field in the header.


and that's one of the thing this main routine uses to jump to the end real 
quickly... but there's also a set of starting and ending markers... plus the 
fact that the data is a Typed Constant is another factor... i don't recall for 
sure, but i think i've been told that FPC doesn't have typed constants???



I believe that NE files similarly had an accessible overall length, but they
also had a checksum field even though this was rarely (if ever) used.


interesting... this routine has a checksum item built into it... IIRC, it was so 
we could detect if the executable had been modified and abort operation if true...



Later Windows formats (PE etc.) might use signing/blessing/branding/checksumming
to varying extents, and I also think there was discussion of unix-style signing
in this (or a related) list a few weeks ago.

Which leaves me thinking that the safest way of doing it would be to look for an
official program, i.e. from MS or from unix binutils, which- if a program was
already signed- might request some sort of key before it would change anything.

Of course, an even safer way would be to leave the executable alone and to put
an early check in the startup code that a subsidiary key file existed, and for
that key to include something that identified the machine or site on which the
program was entitled to run.


true... but as i recall, one of the goals of this capability was to not have 
extra files laying about... i remember the days of dongles and never liked them 
at all...

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


Re: [fpc-pascal] TObjectQueue with ability to dequeue arbitrary positions

2012-08-25 Thread waldo kitty

On 8/24/2012 14:57, Jorge Aldo G. de F. Junior wrote:
[trim]

When the object issues request it has to keep looping (until timeout)
and dequeueing the last message from the mailbox, inspecting its
transaction id for a match and requeueing the same message back into
the mailbox if theres no match.

Thats the problem. When messages are requeued i lose message order
guarantees (Very usefull). They are still guaranteed to be delivered,
but not in order anymore.


when i got here, my first thought was why not add a queueID which is nothing 
more than a sequential serial number that gets reset to zero when the queue is 
empty... then keep the queue sorted on this ID... that should keep the queue in 
order... shouldn't it?


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


Re: [fpc-pascal] variant.inc(82, 10) Error: Illegal type conversion: Text to TextRec

2012-08-25 Thread waldo kitty

On 8/24/2012 18:07, Sven Barth wrote:

Am 24.08.2012 21:21 schrieb Jonas Maebe jonas.ma...@elis.ugent.be
  It is something with your old build, namely the fact that it is not the
latest release (2.6.0 at this time). Building svn versions is only supported if
your starting compiler is the latest release.

Sometimes I wonder if we should put this on some prominent place on the 
website...


it seems to me that folk confuse the term release with... uherrrmmm... 
release... they tend to think of any release as the latest release... they 
don't always think of a published release as being different than intermediate 
releases...

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


Re: [fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-15 Thread waldo kitty

On 8/15/2012 03:33, Rainer Stratmann wrote:

Am Wednesday 15 August 2012 03:52:00 schrieb waldo kitty:

On 8/14/2012 03:11, Rainer Stratmann wrote:

Am Tuesday 14 August 2012 03:28:26 schrieb waldo kitty:

i've been following this whole thread with interest... one thing that
i'm still not clear about, though, is why is this important? is it to
see what areas of the program are actually used or something else?


Yes. It has to do with that.


ok... that's one part that is understandable from a statistics POV...


I am not this experienced with the english language, so sorry if I do noz
understand everything 100%.
What means POV?


sorry... acronym... Point Of View...

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


Re: [fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-14 Thread waldo kitty

On 8/14/2012 03:11, Rainer Stratmann wrote:

Am Tuesday 14 August 2012 03:28:26 schrieb waldo kitty:

i've been following this whole thread with interest... one thing that i'm
still not clear about, though, is why is this important? is it to see what
areas of the program are actually used or something else?

Yes. It has to do with that.


ok... that's one part that is understandable from a statistics POV...


in my mind, a multi-language tool will have all strings translated
into the supported languages...

The translation is a different thing to that.


i don't understand... you have a list of the original strings and other lists of 
those strings translated into other languages... on startup, the program 
determines which language is chosen and it loads that translated language 
file... there is then no more translation needed... the program then simply uses 
those strings using the very same routines and no additional coding is needed... ???



if there are some that are ambiguous or used in a different
way, then they would get broken down further for proper language
constructs...

I do not understand this...


consider in english we might say she opened the door but in another language 
they might use the format of door opened she... basically what i'm trying to 
say is that the constructs of the sentences may be different... my comment above 
was looking that one might have to break down that sentence she opened the 
door into multiple parts so that the translation would be performed and 
assembled in the output of the program easier...



while i have numerous tools and utils out in the wild being
used on a daily bases, none of them are multi-language but i do look
forward to the day when i can produce such with minimal effort in coding...
i have to leave it to others to do the actual translations, though...


I put only ls('snippet1'), ls('snippet2'), ls('snippet3')... around the text
everywhere I want a translation.


this would be no different than the program doing

  writeln(snippet1);

when all strings are translated and stored in some translated language file... 
snippet1 in english would be the same snippet1 in german, dutch, japanese, 
etc... it is my understanding that this is also the way the existing *.po files 
work... the code simply loads english.po or german.po or klingon.po at the start 
of the program and after that, everything is the same...



This is also better if you are searching for text in the program. You find
then exactly the position you want.


i understand what you are saying but i don't understand why... since you 
mentioned an online translation service, are you looking at using live 
translations instead of static ones stored in a language file??


[trim]


You can make other tables (or fields in an array) for each translation for
example. The translation is done somewhere else (for example online
http://109.91.95.104/sprache).


so you are looking to perform live translations, then? what if that translation 
service disappears tomorrow? what about your users then?



There is a file with all snippets and translations (handles _not_ included,
because they may change with each execution of the program).


i don't see how a language can change from one day to the next or even one 
execution to the next...


[trim]


Again: all you have to do in the program is putting a ls() everywhere around
you want a translation.

No need for tons od additional identyfiers and additional lines like:


but there's nothing like that with the existing po files if i'm understanding 
their purpose and method of use... the loading code simply chooses the proper po 
file and then loads the strings into an array or whatever using the same 
variables which are used everywhere no matter what language their contents are 
written in...


i must still be missing something :?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-14 Thread waldo kitty

On 8/14/2012 22:05, Martin wrote:

On 15/08/2012 02:52, waldo kitty wrote:

this would be no different than the program doing

writeln(snippet1);



.i must still be missing something :?


If I understood him correct:

It is not
writeln(snippet1);
it is
writeln('snippet1');

With quotes.


yes, i caught that but thought that those were to be short examples of the 
strings...



He does want (or already has) the text snippets as in-lined constants.


ok...


He does not want to do the work of maintain them in another place (which an
array, or resource string would require.)


what work? someone has to do it, somehow... it just seems better and even easier 
to have them in string variables and then just use them... i mean, ok... 
constants are one thing but they have their limits... if they are not intended 
to be constant then they should be in vars...


FWIW: i have, around here somewhere, code that does alter constants during 
execution... but it is TP6 based hackery code... in the same vein, i also have 
code that saves constants to the executable and then changes them based on 
settings... this instead of a configuration file... then there is also code to 
alter the parent environment's variables... all of these things are TP6 stuff 
but they won't work in FPC or many of today's setups... i'm really dreading to 
have to figure out some other way of handling these types of things... single 
file distributions are very nice even if they are actually multiple files all 
stored in the executable ;)

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


Re: [fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

2012-08-13 Thread waldo kitty

On 8/13/2012 05:09, Rainer Stratmann wrote:

Am Monday 13 August 2012 10:35:55 schrieb Lukasz Sokol:

[TRIM]

You were saying, that you want to know, which string has not been
used / which string has been used and how many times ?


I want to knof if the string was called the first time.
But since I also get the pchar information of the textsnippets from the
programmemory I can translate (make a list or whatever in the future) all
snippets before they were called.


i've been following this whole thread with interest... one thing that i'm still 
not clear about, though, is why is this important? is it to see what areas of 
the program are actually used or something else? in my mind, a multi-language 
tool will have all strings translated into the supported languages... if there 
are some that are ambiguous or used in a different way, then they would get 
broken down further for proper language constructs... while i have numerous 
tools and utils out in the wild being used on a daily bases, none of them are 
multi-language but i do look forward to the day when i can produce such with 
minimal effort in coding... i have to leave it to others to do the actual 
translations, though...



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


Re: [fpc-pascal] Inter-process communication, a cautionary tale

2012-07-20 Thread waldo kitty

On 7/19/2012 03:12, Mark Morgan Lloyd wrote:

waldo kitty wrote:

On 7/18/2012 08:48, Mark Morgan Lloyd wrote:

I was reminded of this when somebody was asking about portable signalling APIs
the other day, but I think it's also relevant to discussion of e.g. how to pass
a keyword to a help viewer.

I am obviously aware of the fact that FPC has an IPC unit which uses a temporary
file, although I have always assumed that that was more to support targets like
DOS that had absolutely no concept of pipes or sockets. But perhaps it really is
the safest choice in all cases.


FWIW: DOS does have and has had pipes... otherwise things like DIR | MORE
would not work... maybe you mean named pipes? ;)


Yes, I do. And I'm obviously aware that there are plenty of addons that graft
named pipes (and mailslots etc.) onto DOS.


i never used any of that... didn't need to AFAIK... just regular pipes worked 
fine for the times i needed them but yes, they a much different animals than 
named pipes...



However I always think of named
pipes, threads etc. as being primarily OS/2 v1 innovations, although some might
have been introduced by the obscure Microsoft OS usually referred to as
European MS-DOS v4.0.


for some reason i was thinking that unix and xenix had named pipes back then... 
either way, i'm out and apologize for the diversion ;)

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


Re: [fpc-pascal] Variable of class method type of function

2012-07-16 Thread waldo kitty

On 7/15/2012 08:13, Jonas Maebe wrote:

On 15 Jul 2012, at 14:05, CA Gorski wrote:


How to declare a variable of class method type of function?

...
var
MyVar: function(AParam: string): boolean of class;
...
gives an error using FPC 2.6.1 (Win64).


You have to use of object, just like for a regular method.


pardon my intrusion but i'm looking for clarification...

in the beginning we had objects... then classes came along and they were the 
new object as objects should have been written to start with (parroting)... so 
now we need to remember to use of object when we are working with nothing but 
classes?


i hope that is sufficiently bikini style* ;)

[* bikini style: short and to the point]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


<    1   2   3   >