      SUBROUTINE MAIN
      LOGICAL*1 ARG1(512), ARG2(512) , STDIN(2)
      LOGICAL*1 LINE1(512), LINE2(512)
      INTEGER EQUAL, GETARG, GETLIN, OPEN
      INTEGER INFIL1, INFIL2, LINENO, M1, M2
      LOGICAL*1 USESTR(27)
      DATA USESTR(1)/117/,USESTR(2)/115/,USESTR(3)/97/,USESTR(4)/103/,US
     *ESTR(5)/101/,USESTR(6)/58/,USESTR(7)/32/,USESTR(8)/32/,USESTR(9)/9
     *9/,USESTR(10)/109/,USESTR(11)/112/,USESTR(12)/32/,USESTR(13)/102/,
     *USESTR(14)/105/,USESTR(15)/108/,USESTR(16)/101/,USESTR(17)/49/,USE
     *STR(18)/32/,USESTR(19)/91/,USESTR(20)/102/,USESTR(21)/105/,USESTR(
     *22)/108/,USESTR(23)/101/,USESTR(24)/50/,USESTR(25)/93/,USESTR(26)/
     *46/,USESTR(27)/0/
      DATA STDIN/45, 0/
      CALL QUERY(USESTR)
      IF (.NOT.(GETARG(1, ARG1, 512) .EQ. -1))GOTO 23000
      CALL ERROR(USESTR)
23000 CONTINUE
      IF (.NOT.(GETARG(2, ARG2, 512) .EQ. -1))GOTO 23002
      CALL SCOPY(STDIN, 1, ARGS, 1)
23002 CONTINUE
      INFIL1 = OPEN(ARG1, 1)
      IF (.NOT.(INFIL1 .EQ. -3))GOTO 23004
      CALL CANT(ARG1)
23004 CONTINUE
      IF (.NOT.(EQUAL(ARGS, STDIN) .EQ. 1))GOTO 23006
      INFIL2 = 1
      GOTO 23007
23006 CONTINUE
      INFIL2 = OPEN(ARG2, 1)
      IF (.NOT.(INFIL2 .EQ. -3))GOTO 23008
      CALL CANT(ARG2)
23008 CONTINUE
23007 CONTINUE
      LINENO = 0
23010 CONTINUE
      M1 = GETLIN(LINE1, INFIL1)
      M2 = GETLIN(LINE2, INFIL2)
      IF (.NOT.(M1 .EQ. -1 .OR. M2 .EQ. -1))GOTO 23013
      GOTO 23012
23013 CONTINUE
      LINENO = LINENO + 1
      IF (.NOT.(EQUAL(LINE1, LINE2) .EQ. 0))GOTO 23015
      CALL DIFMSG(LINENO, LINE1, LINE2)
23015 CONTINUE
23011 GOTO 23010
23012 CONTINUE
      IF (.NOT.(M1 .EQ. -1 .AND. M2 .NE. -1))GOTO 23017
      CALL REMARK(14Heof on file 1.)
      GOTO 23018
23017 CONTINUE
      IF (.NOT.(M2 .EQ. -1 .AND. M1 .NE. -1))GOTO 23019
      CALL REMARK(14Heof on file 2.)
23019 CONTINUE
23018 CONTINUE
      RETURN
      END
      SUBROUTINE DIFMSG(LINENO, LINE1, LINE2)
      LOGICAL*1 LINE1(512), LINE2(512)
      INTEGER LINENO
      CALL PUTINT(LINENO, 5,2)
      CALL PUTCH(10,2)
      CALL PUTLIN(LINE1, 2)
      CALL PUTLIN(LINE2, 2)
      RETURN
      END
