1 #ifndef lint 2 static char sccsid[] = "@(#)misc.c 1.2 (CWI) 85/10/02"; 3 #endif lint 4 5 #include "defs.h" 6 #include "ext.h" 7 8 /* 9 * Number register alocation 10 * 11 * This array must have at least 3*qcol entries or 12 * illegal register names will result. (bwk) 13 */ 14 15 /* 16 * This will counts for the restriction on MAXCOL 17 */ 18 19 char *nregs[] = { 20 "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", 21 "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", 22 "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", 23 "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", 24 "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", 25 "90", "91", "92", "93", "94", "95", "96", "97", "4q", "4r", 26 "4s", "4t", "4u", "4v", "4w", "4x", "4y", "4z", "4;", "4.", 27 "4a", "4b", "4c", "4d", "4e", "4f", "4g", "4h", "4i", "4j", 28 "4k", "4l", "4m", "4n", "4o", "4p", "5a", "5b", "5c", "5d", 29 "5e", "5f", "5g", "5h", "5i", "5j", "5k", "5l", "5m", "5n", 30 "5o", "5p", "5q", "5r", "5s", "5t", "5u", "5v", "5w", "5x", 31 0 32 }; 33 34 char * 35 reg(col, place) 36 { 37 register int i; 38 39 i = sizeof(nregs); 40 41 if( i < 2 * 3 * qcol) 42 error("Too many columns for registers"); 43 if( i < qcol * place + col) 44 error("Out of registers"); 45 return(nregs[qcol * place + col]); 46 } 47