PROGRAM TVG C C This program is an interactive way to produce text only C viewgraphs using the Hershey character set as implemented C on the PDP 11/70. The commands are: C C BYE Logs you out of TVG, same as ^Z. C CLEAR Clears all text and box definitions, the C default values are unchanged. C E t Enter new text to be associated with the C next available identifier. C F [n] Plot final viewgraph on TTn:. C MA [l] d Modify the alignment of TEXTl to d, where C d = 0. (Left) and d = 1. (Right). See C note below. C MB l Draw up to 32 connected line segments. C MC [l] n Modify the character set of TEXTl to n. C See note below. C MO [l] d Modify the orientation on TEXTl to d degrees. C See note below. C MP l Modify the position of TEXTl to that of the C crosshair input. The alignment can also be C chosen if either an L, C or R is typed to C set point. C MS [l] d Modify the size of TEXTl to d inches. C See note below. C MT l t Replace TEXTl with new text t. C N n Place n ticks on right side during REDRAW. C R Redraw with identifiers. C S t Save as file named t. C U t Unsave from file named t. C C To generate a final viewgraph and copy, type: C C >TVG filename.ext C C Where "filename.ext" is the name of the file in which C the viewgraph description is saved. C C NOTE: On the commands MA, MC, MO and MS, if no TEXTl is specified, the C default value is changed. C C On input to the program, the defaults are MA = C, MC = 3, MO = 0. C and MS = .25. C COMMON /INPUT/ NCHRS, NAT, NTO, IN(130) COMMON /FIG/ FIGU, IDUM, NFILE COMMON /TEXTS/ DA, DO, DS, A(96), O(96), X(96), Y(96), 1 S(96), ICHRS(96), DC, C(96), QQ ,TEXT(130,96) COMMON /ETC/ NVERT LOGICAL*1 IN, DC, C, TEXT, QQ LOGICAL FIRST, FIGU DATA DA/.5/, DO/0./, DS/.25/, DC/"3/ DATA FIRST/.TRUE./ DATA FIGU/.TRUE./ C C C - CHECK FOR MCR LINE C CALL DEFILE( -1, , , , , , 'TVG' ) CALL TVGMCR C - ASSIGN PLOTTER. CALL HCUSE CALL HCMAG CALL HOME GOTO 500 C C - READ IN COMMAND. 100 WRITE(5,110) 110 FORMAT('$TVG>') 200 READ(5,210,END=3100) NCHRS, ( IN(N), N=1,NCHRS ) 210 FORMAT(Q,130A1) IF( NCHRS .EQ. 0 ) GO TO 100 C C - GO TO PROPER SECTION OF CODE NAT = 0 DO 1000 N=1,NCHRS NAT = NAT+1 IF( NAT .GT. NCHRS ) GO TO 100 CALL ITWAS( IN(N), 'FMRSUNCEB', 9, ITIS ) GO TO ( 300, 400, 500, 600, 700, 800, 900, 1 1100, 3001, 1000 ), ITIS C C - FINAL PLOT. 300 CALL TVGPLT( .TRUE. ) GO TO 200 C C - MODIFY. 400 CALL TVGMOD GO TO 100 C C - REDRAW. 500 CALL TVGPLT( .FALSE. ) IF( .NOT. FIRST ) GO TO 100 FIRST = .FALSE. WRITE(5,510) 510 FORMAT(' The default file extension is now ".TVG".') GO TO 100 C C - SAVE ON FILE. 600 CALL TVGSAV( .TRUE. ) GO TO 100 C C - UNSAVE FROM FILE. 700 CALL TVGSAV( .FALSE. ) GO TO 100 C C - SET NUMBER OF VERTICAL DIVISIONS. 800 CALL NUMBER(IN,NCHRS,NAT,2,NVERT) GO TO 100 C C - CLEAR? 900 IF( NCHRS .NE. 5 ) GO TO 100 DO 901 I=1,5 CALL ITWAS( IN(I), 'CLEAR', 5, ITIS ) 901 IF( ITIS .NE. I ) GO TO 100 DO 902 I=1,96 902 ICHRS(I) = 0 NFILE = 0 GO TO 500 C 1000 CONTINUE GO TO 100 C C - ENTER NEW TEXT, FIND EMPTY SPACE. 1100 DO 2000 NTEXT=33,58 IF( ICHRS( NTEXT ) .LE. 0 ) GO TO 2100 2000 CONTINUE DO 2001 NTEXT=65,90 IF( ICHRS( NTEXT ) .LE. 0 ) GO TO 2100 2001 CONTINUE DO 2002 NTEXT=1,94 IF( ICHRS( NTEXT ) .LE. 0 ) GO TO 2100 2002 CONTINUE WRITE(5,2010) 2010 FORMAT(' No more identifiers available.') GO TO 100 2100 A( NTEXT ) = DA C( NTEXT ) = DC O( NTEXT ) = DO S( NTEXT ) = DS ICHRS( NTEXT ) = NCHRS-1 DO 3000 N=2,NCHRS 3000 TEXT(N-1,NTEXT) = IN( N ) CALL GIN( X(NTEXT), Y(NTEXT), IT ) CALL ITWAS( IT, 'LCR', 3, ITIS ) IF( ITIS .EQ. 4 ) GO TO 100 A( NTEXT ) = ITIS*.5 - .5 GO TO 100 C C - BYE? 3001 IF( NCHRS .NE. 3 ) GO TO 100 DO 3002 I=1,3 CALL ITWAS( IN(I), 'BYE', 3, ITIS ) 3002 IF( ITIS .NE. I ) GO TO 100 C C - FINISHED? 3100 CALL CLOSE(5) WRITE(5,3110) 3110 FORMAT('$Have you saved it? [Y/n] ') READ(5,210,END=3200) NCHRS, ( IN(N), N=1,NCHRS ) IF( NCHRS .EQ. 0 ) GO TO 3200 CALL ITWAS( IN(1), 'N', 1, ITIS ) IF( ITIS .EQ. 1 ) GO TO 100 C 3200 CALL ERASE CALL CALPLT(0.,0.,999) STOP 'Thank You for using TVG' END