
                               					20-May-1983 10:26:26	VAX-11 FORTRAN V3.2-37              Page   1
								10-May-1983 10:45:34	CAD$VOLSET:[GARY.STATS.SOURCE]TREAD.FOR;14  

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT: All input from the terminal is solicited form this routine
0025    !           only.
0026    !   
0027    !
0028    ! ENVIRONMENT: VAX VMS unpriv
0029    !   
0030    !
0031    ! AUTHOR: Gary Smith, CREATION DATE: 8/19/1952
0032    !
0033    ! MODIFIED BY:
0034    !
0035    !--
0036    !
0037    ! TABLE OF CONTENTS:
0038    !
0039    !
0040    ! INCLUDE FILES: none
0041    !
0042    !
0043    ! MACROS: none
0044    !
0045    !
0046    ! EQUATED SYMBOLS: none
0047    !
0048    !
0049    ! EXTERNAL REFERENCES: STR$UPCASE, msg_inlilenex
0050    !
0051     
0052    !++
0053    ! FUNCTIONAL DESCRIPTION: TERMINAL_READ accepts input from the command
0054    !                         stream. 
0055    !
0056    !
0057    !

                               					20-May-1983 10:26:26	VAX-11 FORTRAN V3.2-37              Page   2
								10-May-1983 10:45:34	CAD$VOLSET:[GARY.STATS.SOURCE]TREAD.FOR;14  

0058    ! FORMAL PARAMETERS: in        ->  the input command buffer
0059    !                    kf        ->  where the string starts in 'in'
0060    !                    len       ->  how long 'in' is
0061    !
0062    !
0063    !
0064    ! IMPLICIT INPUTS: batch -> is STATS running in batch mode
0065    !
0066    !
0067    !
0068    ! IMPLICIT OUTPUTS: none
0069    !
0070    !
0071    !
0072    ! ROUTINE VALUE and
0073    ! COMPLETION CODES: none
0074    !
0075    !
0076    !
0077    ! SIDE EFFECTS: none to date
0078    !
0079    !
0080    !
0081    !--
0082              SUBROUTINE Terminal_read( in, kf, len )
0083     
0084              dimension in(256)
0085     
0086              logical batch
0087              integer in_unit, out_unit
0088              integer start, status
0089     
0090              external STR$UPCASE, msg_inlilenex
0091     
0092              integer STR$UPCASE
0093     
0094              logical*1 input(256), fake(256)
0095     
0096              common / io_com / in_unit, out_unit, batch
0097    !++
0098    ! prompt the STATS user
0099    !--
0100              start=1
0101              if ( .not. batch ) write(out_unit, 20)
0102    20        format($, ' STATS> ' )
0103     
0104    !++
0105    ! clear any information left in the psuedo and real buffers
0106    !--
0107              do 40 i=1,256
0108                 fake(i)=32
0109                 in(i)=32
0110    40        continue
0111     
0112    !++
0113    ! read in the string
0114    !--

TERMINAL_READ                  					20-May-1983 10:26:26	VAX-11 FORTRAN V3.2-37              Page   3
								10-May-1983 10:45:34	CAD$VOLSET:[GARY.STATS.SOURCE]TREAD.FOR;14  

0115     
0116    60        read(in_unit,80,end=180,err=160) len,(fake(i),i=1,256)
0117    80        format(q,256a1)
0118     
0119    !++
0120    ! check for over run on input line
0121    !--
0122              if ( len+start .gt. 256 ) then
0123                 call LIB$SIGNAL( msg_inlilenex )
0124                 return
0125              end if
0126              if ( len .eq. 0 ) return
0127     
0128    !++
0129    ! check for continuation
0130    !--
0131              if ( fake(len) .eq. 45 ) then
0132     
0133    !++
0134    ! copy fake into in except for the continuation mark
0135    !--
0136                 do i=start, start+len-2
0137                    in(i)=fake(i-start+1)
0138                 end do
0139     
0140    !++
0141    ! go back for more
0142    !--
0143                 start=len+start-1
0144                 write(out_unit,120)
0145    120          format($,' STATS>_')
0146                 goto 60
0147              else
0148     
0149    !++
0150    ! no continuation mark found
0151    !--
0152                 do i=start,start+len-1
0153                    in(i)=fake(i-start+1)
0154                 end do
0155              end if
0156              len=start+len-1
0157              if ( batch ) write( out_unit, 130 ) ( in(i), i=1,len )
0158    130       format( ' STATS> ', <len>A )
0159              status = STR$UPCASE( %DESCR(in), %DESCR(in) )
0160              return
0161     
0162    !++
0163    ! something faulty happened; exit
0164    !--
0165    160       stop 'Error on input, STATS exiting...'
0166    180       stop 'STATS exiting...'
0167              end

TERMINAL_READ                  					20-May-1983 10:26:26	VAX-11 FORTRAN V3.2-37              Page   4
								10-May-1983 10:45:34	CAD$VOLSET:[GARY.STATS.SOURCE]TREAD.FOR;14  

PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                  453   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  1 $PDATA                                  96   PIC CON REL LCL   SHR NOEXE   RD NOWRT LONG
  2 $LOCAL                                 608   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG
  3 IO_COM                                  12   PIC OVR REL GBL   SHR NOEXE   RD   WRT LONG

    Total Space Allocated                 1169


ENTRY POINTS

    Address  Type  Name                      References

  0-00000000       TERMINAL_READ                82     


VARIABLES

    Address  Type  Name          Attributes  References

  3-00000008  L*4  BATCH         COMM           86        96       101       157     
  2-00000208  I*4  I                           107=      108       109       116(2)=   136=      137(2)    152=      153(2)  
					       157(2)= 
  3-00000000  I*4  IN_UNIT       COMM           87        96       116     
 AP-00000008@ I*4  KF                           82     
  2-0000020C@ I*4  LEN                          82       116=      122       126       131       136       143       152     
					       156(2)=   157       158     

  3-00000004  I*4  OUT_UNIT      COMM           87        96       101       144       157     
  2-00000200  I*4  START                        88       100=      122       136(2)    137       143(2)=   152(2)    153     
					       156     
  2-00000204  I*4  STATUS                       88       159=    


ARRAYS

    Address  Type  Name          Attributes        Bytes  Dimensions       References

  2-00000100  L*1  FAKE                             256  (256)                94       108=      116=      131       137     
									     153     
 AP-00000004@ I*4  IN                              1024  (256)                82        84       109=      137=      153=    
									     157       159(2)A 
  2-00000000  L*1  INPUT                            256  (256)                94     


LABELS

    Address   Label                          References

  1-00000030  20'                              101       102#    
  0-00000054  40                               107       110#    
  0-0000005D  60                               116#      146     
  1-0000003C  80'                              116       117#    
  1-00000043  120'                             144       145#    

TERMINAL_READ                  					20-May-1983 10:26:26	VAX-11 FORTRAN V3.2-37              Page   5
								10-May-1983 10:45:34	CAD$VOLSET:[GARY.STATS.SOURCE]TREAD.FOR;14  


  1-0000004F  130'                             157       158#    
  0-000001A6  160                              116       165#    
  0-000001B0  180                              116       166#    


FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                 References

        LIB$SIGNAL                             123     
        MSG_INLILENEX                           90       123A    
   I*4  STR$UPCASE                              90        92       159     


  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+



COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:TREAD/LIST=LIS:TREAD/CONT=99/CROSS/NOOPT SRC:TREAD

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           1.89 seconds
  Elapsed Time:       5.44 seconds
  Page Faults:        317
  Dynamic Memory:     817 pages
