~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to routines/system/apropo.f

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine apropo
 
2
c     ====================================================================
 
3
c     Call unix:  scihelp -k symbol
 
4
c     ====================================================================
 
5
c     Copyright INRIA
 
6
      include '../stack.h'
 
7
      character*80 h
 
8
      integer name,eol,quote
 
9
      data name/1/,eol/99/,quote/53/,dot/51/
 
10
      if (char1 .eq. eol) then 
 
11
         h='apropos'
 
12
         nstr=7
 
13
      else
 
14
         call getsym 
 
15
         if (sym .eq. name) then
 
16
            nstr=lpt(4)-lpt(3)+1
 
17
            call cvstr(nstr,lin(lpt(3)-1),h,1)
 
18
         else
 
19
C     argument is a string 
 
20
            if (sym.eq.0) sym = dot
 
21
            call cvstr(1,sym,h,1)
 
22
            nstr=1
 
23
            if (sym.eq.quote) then 
 
24
               call getstr
 
25
               if(err.gt.0) return
 
26
               call getsym
 
27
               ilog= getsmat("helpmg",top,top,ms,ns,1,1,lr,nstr)
 
28
               top=top-1
 
29
               call cvstr(min(nstr,80),istk(lr),h,1)
 
30
            endif
 
31
         endif
 
32
      endif
 
33
      h(nstr+1:nstr+1)= char(0)
 
34
      call isciap(buf,h(1:nstr+1),ierr)
 
35
      if(ierr.ne.0) then
 
36
         call error(85)
 
37
         return
 
38
      endif
 
39
      return
 
40
      end