fp txt ide User Screen fails to initialize
Original Reporter info from Mantis: leetnc
-
Reporter name:
Original Reporter info from Mantis: leetnc
- Reporter name:
Description:
fp-2.2.0 Slackware 12.0 Linux kernel 2.6.21.5
Symptoms:
Running a program from the fp ide does not display any output on the the User Screen. Selecting User Screen from the Debug menu by scrolling down to "User Screen" and hitting return does not display the User Screen.
Observations:
Source File '/fpc-2.2.0/ide/fpusrscr.pas' - In "TLinuxScreen" section, "constructor TLinuxScreen.Init", line 805, there is the statement:
"if (Copy(ThisTTY, 1, 8) = '/dev/tty') and (ThisTTY[9]<>'p') then"
ThisTTY function returns "/dev/vc/1".
ThisTTY never returns '/dev/tty1' because the device entry '/dev/tty1' is only a symbolic link to device '/dev/vc/1'
The symbolic link appears to be a feature related to "udev".
ThisTTY sort of runs through the symbolic link without noticing it.
Suggested Change:
Simplest possible accommodation may be a change in the 'if statement' to :
"if ((Copy(ThisTTY, 1, 8) = '/dev/tty') and (ThisTTY[9]<>'p')) OR (Copy(ThisTTY,1,8)='/dev/vc/') then"
I do not see any reason why this change would interfere with the FreeBSD console case, but had no way to verify that.
Just coincidence that the Copy char count is the same in both instances.
Subsequent statement with FName = '/dev/vcsa1' apparently works because it is a symbolic link to device '/dev/vcc/a1'
"1" in the device names above is used as an example and is what shows up on my particular system.
Additional information:
In the IDE, ALT-F5 also fails to display the User Screen, but that involves a different issue with the Linux kernel 2.6.21.5 apparently not surrendering the ALT-Function keys to application programs ( as root or user). I think.
I used a trial & error approach to flush out the User Screen problem. Would be advisable to run it by your Linux kernel and/or udev guru's.
Mantis conversion info:
- Mantis ID: 10758
- Fixed in version: 2.4.4
- Fixed in revision: 16631 (#661c4330)