[fpc-pascal] RE: FPC and Profiling software

2008-03-13 Thread Jeff Pohlmeyer
Graeme Geldenhuys wrote: > I'm trying to detect where bottlenecks occur in my code. On Linux, you can get some interesting information with something like this: % valgrind --tool=callgrind [YOUR_APP] [YOUR_ARGS] % callgrind_annotate --auto=yes --inclusive=yes > callgrind.log And then have a l

[fpc-pascal] Re: HTML or RichText viewer components

2008-01-08 Thread Jeff Pohlmeyer
David Baldwin's components are very nice, but maybe not so portable. I think they used to be closed-source, but the only license info I could find on his website now says: "Complete source code is provided. The HTML Display Components may now be used without charge in any application including t

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
> the easiest is simply making a FPC header to > pcre, it might be useful even. I did that, once upon a time... http://www.hotlinkfiles.com/files/526004_qpvr0/pcre-fpc.tar.gz -Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
> > this kludge is about 25% faster than your perl script > > on my machine > Nope. It's still more or less twice slower. :-D I guess it depends on the hardware: % time koleksi.pl # perl Word count: 126944 Unique word count: 11793 real0m1.019s user0m0.992s sys 0m0.028s % ti

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
Heck, I'm not even a programmer, and this kludge is about 25% faster than your perl script on my machine program koleski; {$MODE OBJFPC} {$H+} uses classes, strings; var f: text; s:ansistring; wc:longint=0; wl, ul:TStringList; i,n:LongInt; begin assign(f, 'Koleksi.dat'); reset

[fpc-pascal] RE: Profane question: can I use the IDE for another

2007-07-12 Thread Jeff Pohlmeyer
Here is something you might like: http://setedit.sourceforge.net/ - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] RE: Question on how to avoid memory trouble

2007-02-06 Thread Jeff Pohlmeyer
Does somebody have something in source that they'd share with this poor guy, please? Maybe you can find something here? http://torry.net/pages.php?id=256 - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/

[fpc-pascal] Garbled messages in daily digest

2007-01-25 Thread Jeff Pohlmeyer
It looks like the mailing list archives (and daily digest) don't like some messages: http://lists.freepascal.org/lists/fpc-pascal/2007-January/013070.html - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/ma

[fpc-pascal] RE: FreeType 2 with Free Pascal

2006-12-30 Thread Jeff Pohlmeyer
On Sat, 30 Dec 2006, Krishna wrote: btw, is there a (free)pascal translation of the cairo headers? I started one some time back, then lost interest - Here's what I have, X only, no Win32... - Jeff cairo.pp Description: Binary data ___ fpc-pascal mai

[fpc-pascal] Re: Using FPC as a scripting engine

2006-10-14 Thread Jeff Pohlmeyer
I remember seeing some sort of system ( I can't remember the name or URL ) that used a pascal compiler to pre-compile CGI applications. Whenever a client request involved one the apps, the server would check the timestamp of the source against the timestamp of the binary. If the the binary was new

[fpc-pascal] Order of {$H+} and OBJFPC

2006-10-09 Thread Jeff Pohlmeyer
{$H+}{$MODE OBJFPC} Results in short strings with fpc-2.0.4, and long strings with previous compilers. Is this a bug fix, or a new bug? - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fp

[fpc-pascal] RE: Get Local IP using glib (eth0,eth1)

2006-10-06 Thread Jeff Pohlmeyer
Better, but still Linux only. For a good solution, a resolver unit that accesses libc should be written that is portable (unlike the libc unit) If I understood correctly, the OP had two questions: 1. Retrieve a list of interface names on a *linux* system. 2. Return the IP address for a given *

[fpc-pascal] RE: Get Local IP using glib (eth0,eth1)

2006-10-06 Thread Jeff Pohlmeyer
how can i list wich interface loaded without need to parse /etc/networks/...? I would parse /proc/net/dev instead program ifnames; var s:shortstring; f:text; p:LongInt; begin assign(f,'/proc/net/dev'); reset(f); while not eof(f) do begin readln(f,s); p:=pos(':',s); if ( p

[fpc-pascal] RE: h2pas error report

2006-10-05 Thread Jeff Pohlmeyer
Errm, I actually forgot the obvious questions: What's wrong here? How can I get around it? cat input.h | awk '{gsub(/\<__int64\>/," long long "); print}' > output.h - should work, at least on Linux x86 - Jeff ___ fpc-pascal maillist - fpc-pasca

[fpc-pascal] RE: Get Local IP using glib (eth0,eth1)

2006-10-05 Thread Jeff Pohlmeyer
> function to read the local IP eth0/eth1 using glibc library. program ip_addr; ... end. Please ignore my last post - This one is a little cleaner... program ip_addr; {$MODE OBJFPC} uses libc; function GetIPAddressOfInterface( if_name:ansistring):ansistring; var ifr : ifreq; sock : lo

[fpc-pascal] RE: Get Local IP using glib (eth0,eth1)

2006-10-05 Thread Jeff Pohlmeyer
I'm trying to write a function to read the local IP eth0/eth1 using glibc library... program ip_addr; {$MODE OBJFPC} uses libc; const IP_NAMESIZE = 16; type ipstr = array[0..IP_NAMESIZE-1] of char; function GetIPAddressOfInterface( if_name:ansistring):ansistring; var ifr : ifreq; tmp:ips

[fpc-pascal] RE: Problem translating c code to pascal

2006-09-25 Thread Jeff Pohlmeyer
Maybe you can create the array dynamically at run-time, in the unit's initialization section... type p_handler_rec=^handler_rec; pp_handler_rec=^p_handler_rec; var hw_handlers:pp_handler_rec; initialization hw_handlers:=getmem(sizeof(p_handler_rec)*2); new(hw_handlers[0]); hw_handlers[0]^

[fpc-pascal] Re: Free Pascal widget set

2006-08-20 Thread Jeff Pohlmeyer
Why not wxWidgets? I'm not too familiar with wxWidgets, but the headers sure look like C++ to me. - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Jeff Pohlmeyer
If I remember correctly, the DOS FindFirst/Next only handles shortstring-sized path names. Another "quirk" about using FindNext on Unix is that a symlink to a directory sets the faDirectory flag, and if it happens to be a circular symlink, I don't know of any way tell if it is safe to recurse in

[fpc-pascal] RE: Nice website

2006-06-27 Thread Jeff Pohlmeyer
Yes, much better! I had not even looked at it till now. One suggestion: I think the sentence about the M680 should be moved to the end of the first paragraph. Finish telling me about what you do support first. I'm only on the second sentence of the entire website, and already they're telling me w

[fpc-pascal] Re: nano-x

2006-06-22 Thread Jeff Pohlmeyer
I am trying to convert nano-X.h to a pas file but I get some errors. This is 2 of them. I cannot se what the problem is, can anyone give me a hint. h2pas is not perfect, some things it doesn't understand, and other "C" things simply don't make sense in Pascal. So you will probably end up trans

[fpc-pascal] Re: a suggestion...

2006-06-02 Thread Jeff Pohlmeyer
My totally un-scientific test says that for the current "fpc-2.0.2.i386-linux.tar" archive, using bzip2 instead of gzip, it would take about one minute longer to create the archive, and shave about 4 MB off the size. That would cut about 15 minutes off the download time for most 56k dial-up users

[fpc-pascal] RE: Trim repeated whitespace from a string

2006-05-26 Thread Jeff Pohlmeyer
Anybody know of a function that can remove (normalize) a string by remove all beginning and ending whitespace uses SysUtils; S:=Trim(S); as well as replace all repeated spaces with a single space. uses StrUtils; S:=DelSpace1(S); A bonus would be to remove tabs and newlines chars as well

[fpc-pascal] Re: a suggestion...

2006-05-24 Thread Jeff Pohlmeyer
Because gzip is spread wider, we use this instead of bzip2/7zip. I think the size saved by compressing FPC with bz2 would be much greater than the size of downloading and installing a bzip2 extractor. - Jeff ___ fpc-pascal maillist - fpc-pascal@lis

Re: [fpc-pascal] fpdoc document *.pas;*.inc

2006-04-07 Thread Jeff Pohlmeyer
> is there a way to skip the HTML head and footer so the page > is not a complete html document but just a snippet of html? > ... > For example, skipping the html body, head, head closing, > and body closing tags at minimum. tidy --show-body-only yes test.html > test-body.html http://tidy.source

RE: [fpc-pascal] fpdoc document *.pas;*.inc

2006-04-07 Thread Jeff Pohlmeyer
> What command would be used to run FPCdoc on all files in a directory. > PSEUDO EXAMPLE: (crashes fpdoc) > fpdoc --package=Test --input=*.pas;*.inc; fpdoc --package=Test $(ls -1 *.pas *.inc | awk '{printf("input=%s ", $1)}') - Jeff ___ fpc-pascal mai

[fpc-pascal] RE: Atom like feature in FreePascal

2006-03-24 Thread Jeff Pohlmeyer
> I'm interest on an OS independed (or at least Linux and MacOS), > Windows ATOM like* feature, supported by FreePascal. Maybe this? http://www.xfree86.org/4.0.1/XInternAtom.3.html ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.

[fpc-pascal] RE: tidypas (libtidy) question

2006-02-20 Thread Jeff Pohlmeyer
> ... when I do this, I get an AV (in Delphi7). >tidyOptSetValue(fTidyDoc, TidyErrFile, ctmbstr(TIDY_NULL_FILE)); >tidySetErrorFile(fTidyDoc, ctmbstr(TIDY_NULL_FILE)); > { where TIDY_NULL_FILE = 'NUL' for Windows } If you can send me (off-list) a short sample program that shows the AV,

[fpc-pascal] Re: Scripting in FPC

2006-02-09 Thread Jeff Pohlmeyer
> > How about LUA ? > Yes! It seems like i was looking for, thank you very much :-) Glad to help! There is also an IDE for LUA, written in Delphi: http://luaedit.luaforge.net/ It is probably overkill for what you need, but it might be useful to get some ideas on pascal+lua integration. - Je

[fpc-pascal] Re: Scripting in FPC

2006-02-08 Thread Jeff Pohlmeyer
> I want to embed an interpreter in my Free fpc game... How about LUA ? http://www.lua.org/about.html FreePascal bindings: http://assoc.wanadoo.fr/thallium-software/thlua.en.html - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

[fpc-pascal] Re: parameter names local, global, glocal

2006-01-18 Thread Jeff Pohlmeyer
> Prefixing an 'A' seems to be an (un)official delphi naming convention Does this make it official? http://www.econos.de/delphi/cs.html#ObjectPascal_Procedures_Parameters " The 'A' prefix is a convention to disambiguate when the parameter name is the same as a property or field name in the cla

[fpc-pascal] RE: command line editing, history, etc.

2005-12-18 Thread Jeff Pohlmeyer
> I have a command line utility that would really benefit from > command line editing... is there a simple way to add this > kind of readline-like behavior to a FreePascal program? > I would appreciate the functionality on Linux but I might > also use the program on Windows. This works for Linux

[fpc-pascal] getting XML element's value using dom.pp unit

2005-12-09 Thread Jeff Pohlmeyer
> Here's the complete XML file I was trying to read... > ... Not sure if this is part of the problem, but this line: 2005.01.20 12:26:58 Note the spelling: != - Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

[fpc-pascal] RE: for..in loops?

2005-11-18 Thread Jeff Pohlmeyer
> the new for..in loops in Delphi caught my eye > fpc 2.0.0 doesn't compile this... are "for..in" loops > in a newer version or will they be sometime soon? I believe this was discussed at great length back in February, but I'm not sure what the final verdict was: http://lists.freepascal.o

[fpc-pascal] RE: Download file

2005-11-18 Thread Jeff Pohlmeyer
> I would like to download a file via HTTP, how can I achieve that in a > platform independent way? What components to use and is there > some code suited for dummy's available. If you don't mind using an external DLL, CurlPas is quite simple, and works on Linux, Windows, and possibly even Mac..

[fpc-pascal] RE: Linux: synaptics / cURL with SSL

2005-11-06 Thread Jeff Pohlmeyer
> With freepascal 1.0.x I was able to compile cURL-Pascal-Bindings > (http://curl.haxx.se/libcurl/pascal/). This is not longer possible > with freepascal 2.0. Anybody know how to do this? > Anybody knows a replacement? Your timing is perfect, the new version of CurlPas is just released today! Ple

[fpc-pascal] Re: What is the portable approach?

2005-10-02 Thread Jeff Pohlmeyer
AM> I have data that would fit an associative array if they AM> really existed in Pascal I remember spotting this in the "Contributed Units" section, although I don't know if it will suit your needs: http://www.behrenhoff.de/pascal/hash.zip . ___ fp

[fpc-pascal] RE: About reset(aFile, FileNameString)

2005-09-14 Thread Jeff Pohlmeyer
> All of the Pascals that I have used allowed the > following shorthand, an extension: > reset(aFile, FileNameString); {or rewrite, etc.} > I tried overloading reset() ... but it didn't work. procedure reset(var f:text; const fn:string); begin   assign(f, fn);   system.reset(f); end; procedure r

[fpc-pascal] RE: old code with readdir

2005-09-02 Thread Jeff Pohlmeyer
> >  Error: Identifier not found "opendir" > See baseunix.fpreaddir etc in the help. > Note that it is nearly always better to use the highlevel > Pascal equivalents findfirst/findnext. Just be careful calling FindNext recursively on Linux, things can go haywire if you hit a symlink to '.' or s

[fpc-pascal] Re: set envirom variable with pascal in linux

2005-09-02 Thread Jeff Pohlmeyer
> In Bach, Perl, can do set SDL_VER=`sdl-config --version` > But in Pascal non have the setenv() procedure as in C :( > ... > Actualy I resolve this problem with sending the output to a file, and > then reading the file. It sounds to me like you just want a global variable, not an environment va

Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Pohlmeyer
> > {===} > > program contest; > > uses windows; > > > > var > > info:tSTARTUPINFO; > > > > begin > > GetStartupInfo(@info); > > if ( info.hStdInput = 0 ) > > then {Started from Explorer} > > else {Started from Console} > > end. > > {===} >

Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Pohlmeyer
> > > Is it possible for a program to tell whether it was started > > > from the command line or started by double-clicking on the > > > application icon? > > {=} > > program envtest; > > uses Dos; > > var > > F:text; > > i:LongInt; > > begin > > assign(F, 'envlist.txt

[fpc-pascal] Re: Can a program find out how it was started?

2005-08-02 Thread Jeff Pohlmeyer
> Is it possible for a program to tell whether it was started > from the command line or started by double-clicking on > the application icon? Under Win98, there are some subtle differences in the output of the program below, when run from a DOS window vs. double-clicking the icon. I don't kno

[fpc-pascal] RE: Exporting pointers to classes or objects

2005-07-25 Thread Jeff Pohlmeyer
> Since it's not online at Borlands website any more (from somewhen in 1998) Is this it ? http://info.borland.com/borlandcpp/papers/bc360/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] RE: Which OS?

2005-07-12 Thread Jeff Pohlmeyer
> how can I test - at runtime - under which OS (Linux, Windows and so on) > a FPC-program is running? {$IFDEF unix} http://www.freepascal.org/docs-html/rtl/baseunix/fpuname.html {$ELSE} {IFDEF WIN32} http://msdn.microsoft.com/library/en-us/sysinfo/base/getversionex.asp {$EN

[fpc-pascal] Re: type definitions etc

2005-05-28 Thread Jeff Pohlmeyer
> > OK, I didn't try that, so it is allowed to define a type > > as a pointer to a type that is defined later. > Yes, but _only_ if the type declaration comes _immediately_ after > the pointer type declaration. So you can't just declare a bunch > of pointer types and defer the actual type-declara

[fpc-pascal] Re: Help needed with interfacing to C-object-files

2005-03-17 Thread Jeff Pohlmeyer
> Last question to Jeff Pohlmeyer : could you explain > how you made that unit ? Hello, Koenraad... There is not really a one-size-fits-all solution to this, but in general this is what I did for this particular case: # be sure to clean up any leftovers first: rm -f all.h all

[fpc-pascal] Re: Help needed with interfacing to C-object-files.

2005-03-14 Thread Jeff Pohlmeyer
> If you want to take a look, I've put it on > http://users.edpnet.be/~koenraad/www Okay, try this... In your ulinuxgnu300 directory, type: make clean make linux ar -r libonewire.a *.o ranlib libonewire.a And then move the resulting "libonewire.a" file into a directory where the link

[fpc-pascal] RE: Help needed with interfacing to C-object-files.

2005-03-12 Thread Jeff Pohlmeyer
I still don't understand what sort of c "package" you have that generates a bunch of object files, but doesn't create a shared library or static archive. Does it have its own makefile or configure script? Sometimes adding --enable-shared or --enable-static to configure will tell it to build a li

[fpc-pascal] Help needed with interfacing to C-object-files.

2005-03-11 Thread Jeff Pohlmeyer
> My question : is the linker not smart enough to find out > by itself where to look for those missing object files ? Not sure if I understand your question, but as Marc already mentioned, you can control this with the -k-L compiler switch. You can also control the way the compiler/linker sear

[fpc-pascal] Re: Help needed with interfacing to C-object-files.

2005-03-09 Thread Jeff Pohlmeyer
> Let me explain more : the header file is used in at least > five source-files, so compiling gives (at least) five .o > files, but none with the name of the header-file. >From the command line : ar -r libDallas.a file1.o file2.o ... and then, in your program: {$LINKLIB Dallas} - Jef

[fpc-pascal] Re: undefining multiple defines

2005-03-03 Thread Jeff Pohlmeyer
> unit b; > ... > {$undef M1-M15} > {$define M2} > ... > end. Can't you just put all your $undef's in a *.inc file, and then $include it anywhere you need to undef all? unit b; ... {$include undefs.inc} {$define M2} ... end. -- _

[fpc-pascal] Parser Generators

2004-12-03 Thread Jeff Pohlmeyer
> > I'm looking for a good free (as in speech) parser generator for > > FreePascal. Right now I'm working with Coco/R (from > > http://www.tetzel.com/CocoR/) and I'm not very pleased with this tool. > > The generated code works perfect with fpc-1.9.4 but the (parser) > > compiler only works on Wind

[fpc-pascal] gtkextra in fpc?

2004-12-03 Thread Jeff Pohlmeyer
> are there units available to achieve GTKExtra from Free Pascal? There is now... http://www.geocities.com/yetanothergeek/gtkextra.pp.gz . __ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.co

[fpc-pascal] RE: Random(), Randomize, and Linux permissions

2004-09-29 Thread Jeff Pohlmeyer
> Last time I compared FPC's random() to MT, MT was a clear winner. Have you tried this ? http://daniel.taickim.net/development/mtwister.pp __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail

Re: [fpc-pascal]Math/Algebra Unit for FreePascal

2004-07-20 Thread Jeff Pohlmeyer
Here is another link you might find useful: http://www-rab.larc.nasa.gov/nmp/fNMPhome.htm __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail __

[fpc-pascal]Re: Behavior of system.New procedure

2004-07-03 Thread Jeff Pohlmeyer
> > After allocating a new instance for Arec with New proc, > > the record fields (APointer and Aint) will be always > > zero filled or will receive random values? > You must do as if it contains the most unexpected data, > and therefore initialise the fields *yourself*, and the > safer is to d

[fpc-pascal]RE: force redraw on hscale

2004-04-26 Thread Jeff Pohlmeyer
> My question: how can I force a redraw on selected > widgets or the whole window when needed? Maybe this will help: procedure UpdateWidget(w:pGtkWidget); var update_rect: tGdkRectangle; begin update_rect.x:=0; update_rect.y:=0; update_rect.width:=w^.allocation.width; u

[fpc-pascal]RE: GTK accelerator handling

2004-03-23 Thread Jeff Pohlmeyer
> I tried to use gtk_window_remove_accel_group(...) but it is not > found by fpc (gtk has it, I've got the name from its docs). > Is is possible in a simple way to get the missing procedure working? Just add this declaration somewhere in your program: procedure gtk_window_remove_accel_group(win

[fpc-pascal]RE: XTest extension for fpc

2004-03-16 Thread Jeff Pohlmeyer
> Has anyone translated the XTest xtension of XFree86 to pascal yet? I think it would look something like this: unit XTest; interface uses x, xlib; const X_XTestGetVersion = 0; X_XTestCompareCursor = 1; X_XTestFakeInput = 2; X_XTestGrabControl = 3; XTestNumberEvents = 0; XTestNumbe

[fpc-pascal]feature request: enhanced "pos"

2004-03-05 Thread Jeff Pohlmeyer
> Dunno if this is the right place to post such a message, but here goes... > I would love to see a "pos" function that takes an additional parameter, being > the position in the string where it should START scanning. e.g.: > my_str = 'Hello, everybody... Hello, world!'; > x := pos ('Hello', m

[fpc-pascal]RE: quick question

2004-03-05 Thread Jeff Pohlmeyer
program testbot; uses dos; function exists(const fn:string):boolean; var f : text; begin {$I-} if ( fn <> '' ) then begin exists:=True; ioresult; assign(f, fn); reset(f); if ( ioresult = 0 ) then close(f) else exists:=False; end else exists:=False; {$I+} end; fun

[fpc-pascal]RE: SQLite Header File

2004-03-03 Thread Jeff Pohlmeyer
> > Inconsistency detected by ld.so: dl-minimal.c: 134: > > realloc: Assertion `ptr == alloc_last_block' failed!) > The error you get is because you probably forgot to put 'cmem' > as the first unit in your program's uses clause. I'm not sure about SQLite, but i have seen this problem using so

[fpc-pascal]Better/full internet-support in FPC on Linux?

2004-02-26 Thread Jeff Pohlmeyer
> Well there is always libCurl. I've looked this over > and it looks quite thourough check it out. LibCurl doesn't expose it's DNS functions directly. Earlier versions use basically the same system calls as your pascal program would. However, the more recent versions of libcurl have a compil

[fpc-pascal]RE: Defining Records on the fly:

2004-02-18 Thread Jeff Pohlmeyer
Since Free Pascal supports function overloading, you could do something like this: Function CheckPoint(X, Y:real): Boolean; Begin {Does something here..} end; Function CheckPoint(aPoint: tMyRec): Boolean; Begin Result:=CheckPoint(aPoint.X, aPoint.Y); end; // So you can use it either way:

[fpc-pascal]RE: Libglade and fpc

2004-02-13 Thread Jeff Pohlmeyer
> It's possible to implement Libglade in fpc? Anyone has do it? 1.0: http://site.voila.fr/yvesd/downloads.htm 2.0: http://sourceforge.net/projects/gtk2forpascal __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/fi

[fpc-pascal]RE: using sessions and cookies with Free Pascal

2004-02-06 Thread Jeff Pohlmeyer
There is a cookies unit listed under " Contributed Units -> Internet " on the freepascal website, but unfortunately, the link seems be broken. ( Or at least down right now. ) I had a copy laying around, so I uploaded it to my personal homepage: http://houston.quik.com/jkp/cookies.zip Please

[fpc-pascal]Signal handling with libc.pp

2004-01-24 Thread Jeff Pohlmeyer
The libc unit declares the sigaction() function in "sigactionh.inc" as: function sigaction( __sig:longint; Const act: _sigaction; Var oldact: _sigaction):longint;cdecl;external clib name 'sigaction'; According to the libc man page: "Either act or oldact can be a null pointe

[fpc-pascal]Re: working with bitmaps

2003-10-18 Thread Jeff Pohlmeyer
There is a large amount of Delphi-related graphics stuff on Earl F. Glynn's website, but I don't know if there is anything that can be used with with Free Pascal: http://efg2.com/Lab/Library/Delphi/Graphics/ImageProcessing.htm http://efg2.com/Lab/Library/ImageProcessing/index.html http://ef

[fpc-pascal]Re: INET-Unit: Testing existence of a domain?

2003-09-18 Thread Jeff Pohlmeyer
Maybe a little off-topic, but here is a small example to do multiple lookups asynchronously using the "ARES" library: http://houston.quik.com/jkp/ares_pas.pp __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.y

[fpc-pascal]RE: make files

2003-09-08 Thread Jeff Pohlmeyer
> Can someone give me a simple example of a makefile suitable for > just simple compiling of one file ? I am so used to running FPC > from the command line that make is foreign to me. [EXAMPLE] #!/bin/bash all: ppc386 somefile.pas debug: ppc386 -vewh -gl -Crtoi somefile.pp

[fpc-pascal]RE: Read from command line

2003-09-08 Thread Jeff Pohlmeyer
There is a subtle difference between ParamStr(0) and argv[0]: argv[0] is the verbatim command passed to the shell. ParamStr(0) is the full path to the executable. Neither of these will dereference a symlink, to do that you can call ReadLink recursively, or ReadLink(/proc//exe) Also note tha

Re: Hacking was Re: [fpc-pascal]Lazarus

2003-08-31 Thread Jeff Pohlmeyer
> > That's so pathetic. What'd the hacker do anyhow ? And how the heck does > > > a hacker break into a *nix box ? (I assume it is...) > > It's easy. At least if you run an old redhat, or run some of the dangerous > > services. > You really need to be deligent and keep up with the security updat

[fpc-pascal]RE: Debugging FPC

2003-08-21 Thread Jeff Pohlmeyer
> With compile modes: -gg -gl > Aren't line info and tracebacks suppose to be shown, > the above example does not show these. I think the problem comes with using exceptions. Normally, if a run-time error occurs, the default exit proc will print the line number info to stdout. But if an exceptio

[fpc-pascal]linux or libc ?

2003-08-20 Thread Jeff Pohlmeyer
There seems to be some minor conflicts between the linux unit and the new libc unit on 1.0.10 They both seem to get the job done, but putting them both in the same uses clause could make me crazy. :-o Any suggestions/opinions as to which one is best? __ Do you Y

[fpc-pascal]Re: what Programming Environment : Editor & Debugger

2003-08-14 Thread Jeff Pohlmeyer
I use NEdit for nearly all my editing. On the surface, it looks and acts almost like windows notepad. But under the hood, it has lots of powerful features, most of them specific to programming. Things like syntax highlighting, macro recorder and interpretor, shell commands, text filtering from

[fpc-pascal]Re: what Programming Environment : Editor & Debugger

2003-08-14 Thread Jeff Pohlmeyer
> I have also written a program that will make nedit > act something like an "IDE" for free pascal: > http://houston.quik.com/jkp/ne4fpc/ Just my luck, I have hammered on this this thing for almost a year now, and thought I had gotten all of the "show-stopper" bugs out of it. Yesterday I foun

[fpc-pascal]RE: crosscompiling problems with ld(w) from binutils-2.1.4

2003-07-30 Thread Jeff Pohlmeyer
> But as I was bored to reboot my linux, just to compile a program... I feel your pain :-o Another option, maybe to think about: I have had *some* success running ppc386.exe under WINE, although it doesn't seem to find all of its units properly. So I had to put all of the binaries and units re

[fpc-pascal]Re: SQLite and NULL Strings...

2003-07-15 Thread Jeff Pohlmeyer
> like you could arrange for NULL results to be returned as the string > value 'NULL' but then you would be unable to distinguish between > actual strings with the value 'NULL' and the NULL result... Just a thought, but maybe you could return the single-character string: #0 __

[fpc-pascal]RE: FPC version 1.0.10 is out.

2003-07-13 Thread Jeff Pohlmeyer
> The FPC team is pleased to announce that version 1.0.10 of > the Free Pascal Compiler is (finally) released. Hooray ! Great work, guys. I also downloaded the latest version of the HTML documentation ( I absolutely despise PDF ). The documentation looks good, but I found some broken links

Re: [fpc-pascal]Strange Segfault...

2003-07-11 Thread Jeff Pohlmeyer
(* How about using "set of char" instead of "array of char" ? That way, the compiler should be able to distinguish between the overloads... *) program repl; type tSetOfChar = set of char; procedure replace(chars: tSetOfChar; const replace: String; var s: String); var i: Integer; begin

[fpc-pascal]RE: free pascal cross compiler from windows to linux

2003-06-30 Thread Jeff Pohlmeyer
> When I read files off a floppy, they are often all copied with > their executable bit set (which is annoying). You should be able to control this by adding the "noexec" or "exec" option to the floppy entry in your /etc/fstab file: /dev/fd0 /floppy auto noauto,user,noexec 0 0 Or fro

[fpc-pascal]Re: Profiling and classes

2003-03-30 Thread Jeff Pohlmeyer
> However I'm quite sure that it has to with the > OO-methods for accessing array-elements Having no idea what this object is doing, I might be way out of line here, but maybe it would speed things up to implement some sort of a "ForEach" callback, rather than indexing the array on each call.

[fpc-pascal]How to resize window under win32?

2003-02-28 Thread Jeff Pohlmeyer
> I'm launching another program from Freepascal program through "exec" > I need code that can set the position and size of the started program. I haven't used Windows in a while, but I think you need CreateProcess() instead of WinExec() You can to set the dwX, dwY, dwXSize, and dwYSize fields o

[fpc-pascal]Re: Linking to Windows

2003-02-08 Thread Jeff Pohlmeyer
If you have a copy of Delphi's ImageHlp unit, ( or h2pas + imagehlp.h winapi header ) you might want to take a look at this: http://www.blueorbsoft.com/CodeTips/DelphiCodeTips2.html#ListDLLFunctions __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. A