+#ifdef PC
+ /*
+ * if type p requires a range check,
+ * then put out the name of the checking function
+ * for the beginning of a function call which is completed by postcheck.
+ * (name1 is for a full check; name2 assumes a lower bound of zero)
+ */
+precheck( p , name1 , name2 )
+ struct nl *p;
+ char *name1 , *name2;
+ {
+
+ if ( opt( 't' ) == 0 ) {
+ return;
+ }
+ if ( p == NIL ) {
+ return;
+ }
+ if ( p -> class == TYPE ) {
+ p = p -> type;
+ }
+ switch ( p -> class ) {
+ case RANGE:
+ if ( p != nl + T4INT ) {
+ putleaf( P2ICON , 0 , 0 , ADDTYPE( P2FTN | P2INT , P2PTR )
+ , p -> range[0] != 0 ? name1 : name2 );
+ }
+ break;
+ case SCAL:
+ /*
+ * how could a scalar ever be out of range?
+ */
+ break;
+ default:
+ panic( "precheck" );
+ break;
+ }
+ }
+
+ /*
+ * if type p requires a range check,
+ * then put out the rest of the arguments of to the checking function
+ * a call to which was started by precheck.
+ * the first argument is what is being rangechecked (put out by rvalue),
+ * the second argument is the lower bound of the range,
+ * the third argument is the upper bound of the range.
+ */
+postcheck( p )
+ struct nl *p;
+ {
+
+ if ( opt( 't' ) == 0 ) {
+ return;
+ }
+ if ( p == NIL ) {
+ return;
+ }
+ if ( p -> class == TYPE ) {
+ p = p -> type;
+ }
+ switch ( p -> class ) {
+ case RANGE:
+ if ( p != nl + T4INT ) {
+ if (p -> range[0] != 0 ) {
+ putleaf( P2ICON , p -> range[0] , 0 , P2INT , 0 );
+ putop( P2LISTOP , P2INT );
+ }
+ putleaf( P2ICON , p -> range[1] , 0 , P2INT , 0 );
+ putop( P2LISTOP , P2INT );
+ putop( P2CALL , P2INT );
+ }
+ break;
+ case SCAL:
+ break;
+ default:
+ panic( "postcheck" );
+ break;
+ }
+ }
+#endif PC
+