[fpc-pascal] Reading non-printable caracters in file (linux)

2008-08-16 Thread TOUZEAU DAVID
Dear. I need to read /proc/pid/cmdline files But if i use a standard function that read file with assign,"readln",EOF some important non-printables caracters are not trapped with fpc readln : imapd-s-U30 if i use cat -v "cat -v /proc/26328/cmdline" [EMAIL PROTECTED]@[EMAIL PROTECTED

[fpc-pascal] libmilter + freepascal

2008-06-06 Thread TOUZEAU DAVID
Dear I'm trying to find examples using libmilter (sendmail milter) with freepascal. Does anybody have usefull links or code with it ? best regards -- David Touzeau -- Linux Ubuntu 7.04 feisty FreePascal-Lazarus,perl,delphi,php artica for postfix management console (ht

[fpc-pascal] Cross-compile on Linux from 32bits to 64bits

2008-05-24 Thread TOUZEAU DAVID
Dear I'm using a 32 bits Linux system to developp and i want my program to be 64 Bits compatible. What is the best method to allow my program to be compatible on 32 And 64 bits ? Besst regards -- David Touzeau -- Linux Ubuntu 7.04 feisty FreePascal-Lazarus,perl,del

[fpc-pascal] Re: [fpc-devel] Local variable X does not seem to be initialized as a "TextFile" value

2007-12-28 Thread TOUZEAU DAVID
It's a 2.2.0 : Free Pascal Compiler version 2.2.0 [2007/08/30] for i386 Copyright (c) 1993-2007 by Florian Klaempfl /usr/lib/fpc/2.2.0/ppc386 [options] Jonas Maebe a écrit : On 28 Dec 2007, at 12:06, TOUZEAU DAVID wrote: I have many warning like (966,12) Hint: Local variable "X

[fpc-pascal] How to send stdout pipe to a process ?

2007-11-24 Thread TOUZEAU DAVID
Dear I would like to send a TStringList.text to an external process (kind of stdout) i have an external process that require to receive datas from stdin like /home/process1 I would like my program to send datas inserted into a Tstringlist to this "process1" I think i should use "Output" bu

Re: [fpc-pascal] HOW TO, PROBLEM read stdin (linux) ??

2007-11-24 Thread TOUZEAU DAVID
adln(st,s); //<<< read only a line writeln(s); end; close(st); // <<<<<--- end. -- Att, Wanderlan Santos dos Anjos On Nov 24, 2007 8:15 AM, TOUZEAU DAVID <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Dear What is the best way to

[fpc-pascal] HOW TO, PROBLEM read stdin (linux) ??

2007-11-24 Thread TOUZEAU DAVID
Dear What is the best way to read into a memory datas from this command. "/bin/myprogram end. -- David Touzeau -- Linux Ubuntu 7.04 feisty FreePascal-Lazarus,perl,delphi,php artica for postfix management console (http://www.artica.fr) icq:160018849 __

[fpc-pascal] Best way for "tail" a log file

2007-06-05 Thread TOUZEAU DAVID
Dear I need to parse /var/log/maillog file in the same way of /bin/tail tool in order to parse some lines. What is the best way or do you have such function that follow the write lines in a file ?? Best regards -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePasca

Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread TOUZEAU DAVID
, patrick feillant wrote: MilliSecondsBetween<http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/dateutils/millisecondsbetween.html> Maybe simpler Secondsbetween() ? :o) 2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED]>: Is there a function that help me to calculate seconds sin

Re: [fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-04 Thread TOUZEAU DAVID
values. between encodedatetime(1970,1,1,0,0,0,0) and Present I don't test, but it's probably ok. bye 2007/6/4, TOUZEAU DAVID <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>: Dear Is there a function that help me to calculate seconds since 1970 year ?

[fpc-pascal] Get Timestamp since 1970 (linux)

2007-06-03 Thread TOUZEAU DAVID
Dear Is there a function that help me to calculate seconds since 1970 year ? exactly the same of this command : /bin/date +%s -d 20070103 best regards -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849

[fpc-pascal] [fpstat - file]: Return the correct number of st_mode in order to get chmod permissions ?

2007-04-03 Thread TOUZEAU DAVID
Dear I need to return the correct mask of chmod permission, in this case, i have copy the FPC example , but i cannot convert "info.st_mode" in human readable mask (0777, 0755...) For example, with a file in 0755 mask the function return 16877 value in info.st_mode. best regards unit bas

Re: [fpc-pascal] [oldlinux]: STAT_IRWXG get chmod number

2007-04-01 Thread TOUZEAU DAVID
Thanks marco for the way i have copy the example , but how can i convert "info.st_mode" in human readable mask (0777, 0755...) For example, a file in 0755 mask is 16877 value in info.st_mode. best regards unit base_unix; {$mode objfpc}{$H+} interface uses Classes, SysUtils,variants, Linux

[fpc-pascal] [oldlinux]: STAT_IRWXG get chmod number

2007-04-01 Thread TOUZEAU DAVID
hello Is there anybody has worked with STAT_IRWXG ? http://www.freepascal.org/docs-html/rtl/oldlinux/index-2.html I need infos in order to get a function that get file permissions on linux system (like 0777, 0755...) best regards -- David Touzeau -- Linux Ubuntu Dap

Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-30 Thread TOUZEAU DAVID
Yes The problem is fixed now by adding libssl.so.0 link Lukas Gebauer a écrit : Currently synpase doesn't working with ssl mode but if you want to do this in linux environement LibCurl is a good way and do that you want... http://curl.haxx.se/libcurl/pascal/ The only problem that it require *.s

Re: [fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-28 Thread TOUZEAU DAVID
oblem with synapse in SSL mode in order to not install others librairies... Rainer Stratmann a écrit : Am Samstag, 25. November 2006 04:09 schrieb TOUZEAU DAVID: Dear I'm searching examples that help me to implement on a linux system an HTTP client that supporting SSL HTTPS in ord

Re: [HTTPS]: Looking for a ssl http client [fpc-pascal]

2006-11-25 Thread TOUZEAU DAVID
Hum Thanks for the information but i'm developping an Open Source application... This module is not free version... 5 655$ is a little bit expensive for me :=) Eugene Mayevski a écrit : Hello! You (TOUZEAU DAVID [mailto:[EMAIL PROTECTED]) wrote about "[fpc-pascal] [HTTPS]: Looking

[fpc-pascal] [HTTPS]: Looking for a ssl http client

2006-11-24 Thread TOUZEAU DAVID
Dear I'm searching examples that help me to implement on a linux system an HTTP client that supporting SSL HTTPS in order to post, get and downloading files with or without proxy support... A kind of functions in the same way of synalist THTTPSend (http://www.ararat.cz/synapse/docs/help/inde

Re: [fpc-pascal] [SYSTEM] Linux processes when execute external program SIGCHILD,fpWaitPID

2006-11-24 Thread TOUZEAU DAVID
, TOUZEAU DAVID wrote: Dear my application run has a daemon When the daemon load, it create a Timer function as a class(TThread). This Timer thread has a loop and create an another Thread (called "SendStatus" each 5 minutes) function that l

Re: [fpc-pascal] [NETWORK - LINUX ]: Calculate broadcast - network

2006-10-17 Thread TOUZEAU DAVID
longint n:=StrToHostAddr('255.255.0.0').s_addr; ia.s_addr:=a and n; writeln('Network ->',HostAddrToStr(ia)); ia.s_addr:=a or not n; writeln('broadcast ->',HostAddrToStr(ia)); Michael Van Canneyt a écrit : On Thu, 12 Oct 2006, Michael Van Canneyt wrote:

[fpc-pascal] [regex] : Is someone use SynRegExpr ? RegExpr2 vs SynRegExpr

2006-10-15 Thread TOUZEAU DAVID
dear Currently i use RegExpr2 (http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=Regexpr2) to perform regex matching.. did SynRegExpr (http://www.lazarus.freepascal.org/lcl_doc/SynRegExpr.html#link23852) unit is better than RegExpr2 ? How to use SynRegExpr unit ? Currently my code to use RegEx

Re: [fpc-pascal] [NETWORK - LINUX ]: Calculate broadcast - network

2006-10-12 Thread TOUZEAU DAVID
Dear The tool is designed to simplify the change network settings quickly. So the goal for the admin is to type: #./tool 192.168.1.2 255.255.255.0 192.168.1.1 and the tool will change settings in /etc/network/interfaces by iface eth0 inet static address 192.168.1.2 netmask

[fpc-pascal] [NETWORK - LINUX ]: Calculate broadcast - network

2006-10-12 Thread TOUZEAU DAVID
Dear I develop a tool that change the network settings in /etc/network/interfaces the config file must be iface eth0 inet static address 192.168.xx.xx netmask 255.255.255.0 network 192.168.xx.0 broadcast 192.168.xx.255 gateway 192.168.xx.xx In this cas

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-12 Thread TOUZEAU DAVID
Many thanks i found the function GetEUID i'll try it http://www.cs.uwc.ac.za/~firstyear/manuals/doc/units/unitsse36.html#x53-41900012.3 Pete Cervasio a écrit : On Wednesday 11 October 2006 20:44, Michalis Kamburelis wrote: Pete Cervasio wrote: The better way would be to use the geteu

[fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread TOUZEAU DAVID
Dear I need to detect if the program is executed as root privileges on Linux system. Did somebody had developped a such function ?? Best regards. -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849

Re: [fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread TOUZEAU DAVID
Many Thanks vincent exactly what i want to find !!! Vincent Snijders a écrit : TOUZEAU DAVID schreef: Dear I would like to crypt some files/strings/datas with fpc on Linux systems. What unit can i use to provide this feature ? I there a standard unit or somebody had already developped a

[fpc-pascal] [CRYPT]: Is there an unit to perform crypt/decrypt on Linux ?

2006-10-11 Thread TOUZEAU DAVID
Dear I would like to crypt some files/strings/datas with fpc on Linux systems. What unit can i use to provide this feature ? I there a standard unit or somebody had already developped a such unit ? -- David Touzeau -- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delp

[fpc-pascal] visualserver from VisualSynapse how implement it as a Linux console Daemon

2006-10-06 Thread TOUZEAU DAVID
Dear is anybody there use visualserver from VisualSynapse (http://visualsynapse.sourceforge.net/?id=8) and impleted it on Linux has a console mode...?? Examples given is only on application interface ... Problems: 1) When the application start, no web page are generated... 2) i would like t

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

2006-10-06 Thread TOUZEAU DAVID
Many thanks to the community To reply to Graeme : why not just use the /sbin/ifconfig output ? Simply to be more dev compliance... using an external program is slower and sometime ifconfig doesn't exist or is deleted on target computers. To reply to Marco : And the only "good" solution is a po

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

2006-10-06 Thread TOUZEAU DAVID
Many Thanks for this way jeff... /proc/net/dev is more compatible Impressed it for your information. My program will run only on linux system... Marco van de Voort a écrit : I would parse /proc/net/dev instead Better, but still Linux only. For a good solution, a resolver unit that ac

Re: [fpc-pascal] [libtar.pas]:Error: Illegal type conversion: "ShortString" to "^Char" without compilator options

2006-10-06 Thread TOUZEAU DAVID
Many thanks Vincent the {$mode delphi} is a good way... Vincent Snijders a écrit : TOUZEAU DAVID schreef: Dear I would like to use some units developped from delphi/klyx with Lazarus IDE On Linux. It seems that there is some differences between delphi/freepascal especially for longstring

[fpc-pascal] [libtar.pas]:Error: Illegal type conversion: "ShortString" to "^Char" without compilator options

2006-10-06 Thread TOUZEAU DAVID
Dear I would like to use some units developped from delphi/klyx with Lazarus IDE On Linux. It seems that there is some differences between delphi/freepascal especially for longstring conversion. Many times, i received this compilator error : For example by using the LibTar.pas (http://www

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

2006-10-06 Thread TOUZEAU DAVID
OK i understand that i using i386 no 64 bits Marco van de Voort a écrit : This function works perfectly without need to regex ifconfig... And i use glibc I develop only on linux system. Note that it is linux/x86 only. No 64-bit, or other platforms. -- David Touzeau --

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

2006-10-06 Thread TOUZEAU DAVID
Many Thanks Jeff and Micha. This function works perfectly without need to regex ifconfig... And i use glibc I develop only on linux system. Great respects... Just another question... (this because i came from Windows OS) how can i list wich interface loaded without need to parse /etc/networks

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

2006-10-05 Thread TOUZEAU DAVID
Hi I'm trying to write a function to read the local IP eth0/eth1... using glibc library... I found only examples that found the 127.0.0.1 IP but not the real IP : http://community.freepascal.org:1/bboards/message?message_id=233776&forum_id=24083 http://lists.freepascal.org/lists/fpc-pasca