[fpc-pascal] Linux Questions

Wolfe, Robert Robert.Wolfe at RoswellPark.org
Tue Sep 19 15:06:10 CEST 2006


> -----Original Message-----
> From: fpc-pascal-bounces at lists.freepascal.org [mailto:fpc-pascal-
> bounces at lists.freepascal.org] On Behalf Of Rainer Stratmann
> Sent: Tuesday, September 19, 2006 9:12 AM
> To: FPC-Pascal users discussions
> Subject: [fpc-pascal] Linux Questions


> does someone know how to lock the console output in Linux?
> Here is a program that uses Framebuffer (Linux Runlevel 2).
> It works, but it would be good to lock the console bevor writing to the
> framebuffer and then to unlock the console at the end of the program.
> I googled, but can not find a solution.
> Has it to do with ioctl() calls on "/dev/tty" ?
> 
> Second question is how to mount and umount for example "/dev/sda1" in a
> fpc
> program.

In answer to your second question, the simplest way I can think of doing this is to use something similar to the following:

procedure format
{M$ 2000,0, 0}
uses dos;
var forpar : text; {forpar steht for format parameter}
begin
write (´Parameter:´);
readln (forpar);
swapvector
exec (´A:\format.com´ , forpar)
swapvector
end;

The section in question I am really pointing out here is:

swapvector
exec (´A:\format.com´ , forpar)
swapvector

Hope this helps.

Robert Wolfe (robert.wolfe at roswellpark.org / wolfer at trocaire.edu)
Computer Programmer/Analyst & Web Programmer
SRDAR, Roswell Park Cancer Institute, Buffalo, New York
716-845-5788 | http://www.srdar.org


This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.



More information about the fpc-pascal mailing list