+/*
+ * Try to figure out where the PROM stores the cursor row & column
+ * variables. Returns nonzero on error.
+ */
+int
+romgetcursoraddr(rowp, colp)
+ register int **rowp, **colp;
+{
+ char buf[100];
+
+ /*
+ * line# and column# are global in older proms (rom vector < 2)
+ * and in some newer proms. They are local in version 2.9. The
+ * correct cutoff point is unknown, as yet; we use 2.9 here.
+ */
+ if (promvec->pv_romvec_vers < 2 || promvec->pv_printrev < 0x00020009)
+ sprintf(buf,
+ "' line# >body >user %x ! ' column# >body >user %x !",
+ rowp, colp);
+ else
+ sprintf(buf,
+ "stdout @ is my-self addr line# %x ! addr column# %x !",
+ rowp, colp);
+ *rowp = *colp = NULL;
+ rominterpret(buf);
+ return (*rowp == NULL || *colp == NULL);
+}
+#endif
+