BSD 4 release
[unix-history] / usr / src / cmd / pi / yyget.c
index 13ca068..f8d5c5c 100644 (file)
@@ -1,19 +1,8 @@
 /* Copyright (c) 1979 Regents of the University of California */
 /* Copyright (c) 1979 Regents of the University of California */
-#
-/*
- * pi - Pascal interpreter code translator
- *
- * Charles Haley, Bill Joy UCB
- * Version 1.1 February 1978
- *
- *
- * pxp - Pascal execution profiler
- *
- * Bill Joy UCB
- * Version 1.1 February 1978
- */
 
 
-#include "whoami"
+static char sccsid[] = "@(#)yyget.c 1.1 8/27/80";
+
+#include "whoami.h"
 #include "0.h"
 #include "yy.h"
 
 #include "0.h"
 #include "yy.h"
 
@@ -219,9 +208,9 @@ includ()
  *             pexit(DIED);
  *     }
  */
  *             pexit(DIED);
  *     }
  */
-       if (!dotted(cp, 'i')) {
+       if ((!dotted(cp, 'i')) && (!dotted(cp, 'h'))) {
                line = yyline;
                line = yyline;
-               error("Include filename must end in .i");
+               error("Include filename must end in .i or .h");
        }
 #ifdef PXP
        commincl(cp, ch);
        }
 #ifdef PXP
        commincl(cp, ch);
@@ -273,6 +262,9 @@ includ()
  *     ibp = cp;
  *
  */
  *     ibp = cp;
  *
  */
+#      ifdef PC
+           stabinclude( filename );
+#      endif PC
        return (1);
 }
 
        return (1);
 }
 
@@ -337,6 +329,13 @@ uninclud()
                }
        } else
                printed = ip->Printed;
                }
        } else
                printed = ip->Printed;
+#      ifdef PC
+           if ( inclev == 0 ) {
+               stabsource( filename );
+           } else {
+               stabinclude( filename );
+           }
+#      endif PC
        inclev--;
        return (1);
 }
        inclev--;
        return (1);
 }