File: basout.f

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (74 lines) | stat: -rw-r--r-- 2,206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
      subroutine basout(io,lunit,string)
c     gestion des sorties sur le "standard output" de scilab.
c
c     Copyright INRIA
      include '../stack.h'
      character*(*) string
      character ch*1
c
      if(lunit.eq.wte) then
c        Sortie sur la sortie standard
         call xscion(iflag)
         io=0
         if(lct(1).eq.-1) return
         if(lct(2).gt.0) then
c           Gestion de la pagination
            if(lct(1)+3.gt.lct(2)) then
c              nombre maxi de ligne atteint,gestion du more
               lct(1)=0
               if (iflag.eq.0) then 
c                 scilab n'a pas de  fenetre propre
                  write(wte, '('' more ?'',$)')
                  ch=' '
                  read(rte,'(a1)') ch 
                  if(ch.ne.' ') ich=1
               else
c                 scilab a une  fenetre  en propre
                  call xscimore(ich)
               endif
               if(ich.eq.1) then
                  if (iflag.eq.0) write(wte,'(a)')
                  lct(1)=-1
                  io=-1
                  return
               endif
            else
               lct(1)=lct(1)+1
            endif
         endif
         if(iflag.eq.0) then
            write(lunit,'(a)') string
         else
            call xscistring(string,len(string))
         endif
c        write to diary file if required
         call diary(string,len(string))
      else
c        sortie sur fichier
         if (lunit.eq.wio)  then
            call diary(string,len(string))
         else
            write(lunit,'(a)') string
         endif
      endif
      end

      subroutine basou1(lunit,string)
c     gestion des sorties sur le "standard output" de scilab.
c     la ligne editee n'est pas suivie de retour a la ligne
      include '../stack.h'
      character*(*) string
      if (lunit.eq.wte) then 
         call xscion(iflag)
         if (iflag.eq.0) then 
            write(lunit,'(a,$)') string
            if(lunit.eq.wte.and.wio.ne.0) write(wio,'(a,$)') string
         else
            call xscisncr(string,len(string))
            if(wio.ne.0) write(wio,'(a,$)') string
         endif
      else
         write(lunit,'(a,$)') string
      endif
      end