allow writing of pointers to text files
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 13 Apr 1982 06:36:37 +0000 (22:36 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 13 Apr 1982 06:36:37 +0000 (22:36 -0800)
SCCS-vsn: usr.bin/pascal/src/proc.c 1.10

usr/src/usr.bin/pascal/src/proc.c

index f67f793..ae1fb3d 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)proc.c 1.9 %G%";
+static char sccsid[] = "@(#)proc.c 1.10 %G%";
 
 #include "whoami.h"
 #ifdef OBJ
 
 #include "whoami.h"
 #ifdef OBJ
@@ -342,6 +342,14 @@ proc(r)
                         * the default.
                         */
                        switch (typ) {
                         * the default.
                         */
                        switch (typ) {
+                       case TPTR:
+                               warning();
+                               if (opt('s')) {
+                                       standard();
+                               }
+                               error("Writing %ss to text files is non-standard",
+                                   clnames[typ]);
+                               /* and fall through */
                        case TINT:
                                if (fmt != 'f') {
                                        ap = stkrval(alv, NIL , RREQ );
                        case TINT:
                                if (fmt != 'f') {
                                        ap = stkrval(alv, NIL , RREQ );
@@ -386,7 +394,9 @@ proc(r)
                                if (opt('s')) {
                                        standard();
                                }
                                if (opt('s')) {
                                        standard();
                                }
-                               error("Writing scalars to text files is non-standard");
+                               error("Writing %ss to text files is non-standard",
+                                   clnames[typ]);
+                               /* and fall through */
                        case TBOOL:
                                stkrval(alv, NIL , RREQ );
                                put(2, O_NAM, (long)listnames(ap));
                        case TBOOL:
                                stkrval(alv, NIL , RREQ );
                                put(2, O_NAM, (long)listnames(ap));