Browse Source

Enable the IDE for Symobi

* unix/video.pp
   for now the default height of the terminal is set to 23, because a new line is added at the end and so the IDE would be visually garbaged
* ide/fpusrscr.pas:
   - fill WS with zeros for platforms that don't support that IOCTL...
   - same explanation for the 23 as above for unix/video.pp
* fpcompil.pas:
   don't wait for keypresses on Symobi (that blocks...) or one has to hit the keyboard 24 times so one can start using the IDE
* Makefile.fpc
   compile the IDE for Symobi

git-svn-id: branches/svenbarth/symobi@18147 -
svenbarth 14 years ago
parent
commit
d85dd6de7e
4 changed files with 14 additions and 2 deletions
  1. 1 1
      Makefile.fpc
  2. 3 0
      ide/fpcompil.pas
  3. 7 0
      ide/fpusrscr.pas
  4. 3 1
      rtl/unix/video.pp

+ 1 - 1
Makefile.fpc

@@ -150,7 +150,7 @@ INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 # Skipped by default for cross compiles, because it depends on libc
 ifndef CROSSCOMPILE
 ifneq ($(wildcard ide),)
-IDETARGETS=go32v2 win32 win64 linux freebsd os2 emx beos haiku 
+IDETARGETS=go32v2 win32 win64 linux freebsd os2 emx beos haiku symobi 
 ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
 IDE=1
 endif

+ 3 - 0
ide/fpcompil.pas

@@ -295,9 +295,12 @@ begin
           SetStatus('Parsing User Screen line '+IntToStr(y)+'/'+IntToStr(YMax));
           CompilerMessageWindow^.Lock;
         end;
+{$ifndef symobi}
+      { on Symobi this will block :( }
       GetKeyEvent(LEvent);
       if (LEvent.What=evKeyDown) and (LEvent.KeyCode=kbEsc) then
         break;
+{$endif}
       SearchBackTrace;
       InsertInMessages(' Fatal:',v_Fatal or v_lineinfo,true);
       InsertInMessages(' Error:',v_Error or v_lineinfo,true);

+ 7 - 0
ide/fpusrscr.pas

@@ -777,11 +777,18 @@ begin
        end;
      If Copy(GetEnv('TERM'),1,6)='cons25' Then
        Console:=ttyFreeBSD;
+     FillChar(WS, SizeOf(WS), 0);
      fpioctl(stdinputhandle, TIOCGWINSZ, @WS);
      if WS.ws_Col=0 then
        WS.ws_Col:=80;
      if WS.ws_Row=0 then
+{$ifdef symobi}
+      { normally Symobi's terminal has 24 rows, but a new line is added at the
+        end, so applications like the IDE get visually garbaged }
+       WS.ws_Row:=23;
+{$else}
        WS.ws_Row:=25;
+{$endif}
      ConsWidth:=WS.ws_Col;
      ConsHeight:=WS.ws_row;
    end;

+ 3 - 1
rtl/unix/video.pp

@@ -1190,7 +1190,9 @@ begin
       WS.ws_Col:=80;
      if WS.ws_Row=0 then
 {$ifdef symobi}
-      WS.ws_Row:=24;
+      { normally Symobi's terminal has 24 rows, but a new line is added at the
+        end, so applications like the IDE get visually garbaged }
+      WS.ws_Row:=23;
 {$else}
       WS.ws_Row:=25;
 {$endif}