[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

[fpc-pascal] representation of a number

2007-04-01 Thread Daniel Franzini
Hi all I'm having some fun solving some programming problems in SPOJ (www.spoj.pl, very very cool, check it out). The thing is that is need to calculate some big fatorials (~100!). With FPC and the standard integer types I was unable to perform the correct calculations because 100! is bigger

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

2007-04-01 Thread Marco van de Voort
Is there anybody has worked with STAT_IRWXG ? http://www.freepascal.org/docs-html/rtl/oldlinux/index-2.html That is a legacy api. Better use Baseunix: I need infos in order to get a function that get file permissions on linux system (like 0777, 0755...)

Re: [fpc-pascal] representation of a number

2007-04-01 Thread Marco van de Voort
I'm having some fun solving some programming problems in SPOJ (www.spoj.pl, very very cool, check it out). The thing is that is need to calculate some big fatorials (~100!). With FPC and the standard integer types I was unable to perform the correct calculations because 100! is bigger than

[fpc-pascal] Pipe buffering, accessing C-style stdin/stdout

2007-04-01 Thread Ingemar Ragnemalm
Dear list, I have been struggling for quite a while (that is weeks) to get proper pipe communication with a sublaunched program, using TProcess or straight pipe/fork/exec calls. This is under Mac OSX, but the problem should be similar under any Unix. The problem is the buffering. Using

Re: [fpc-pascal] Pipe buffering, accessing C-style stdin/stdout

2007-04-01 Thread Marco van de Voort
After a lot of googling and experimenting, I think I have managed to make it work, but only in C code, and I want it to run in Pascal. The key to make it work in C was to call setvbuf at the right time, to set the buffering mode for stdin/stdout. The problem with FPC is that I can't find

Re: [fpc-pascal] Pipe buffering, accessing C-style stdin/stdout

2007-04-01 Thread Vincent Snijders
Marco van de Voort schreef: After a lot of googling and experimenting, I think I have managed to make it work, but only in C code, and I want it to run in Pascal. The key to make it work in C was to call setvbuf at the right time, to set the buffering mode for stdin/stdout. The problem with

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,