perl 3.0 patch #14 patch #13, continued
[p5sagit/p5-mst-13.2.git] / stab.c
CommitLineData
79a0689e 1/* $Header: stab.c,v 3.0.1.5 90/03/12 17:00:11 lwall Locked $
a687059c 2 *
3 * Copyright (c) 1989, Larry Wall
4 *
5 * You may distribute under the terms of the GNU General Public License
6 * as specified in the README file that comes with the perl 3.0 kit.
8d063cd8 7 *
8 * $Log: stab.c,v $
79a0689e 9 * Revision 3.0.1.5 90/03/12 17:00:11 lwall
10 * patch13: undef $/ didn't work as advertised
11 *
9f68db38 12 * Revision 3.0.1.4 90/02/28 18:19:14 lwall
13 * patch9: $0 is now always the command name
14 * patch9: you may now undef $/ to have no input record separator
15 * patch9: local($.) didn't work
16 * patch9: sometimes perl thought ordinary data was a symbol table entry
17 * patch9: stab_array() and stab_hash() weren't defined on MICROPORT
18 *
663a0e37 19 * Revision 3.0.1.3 89/12/21 20:18:40 lwall
20 * patch7: ANSI strerror() is now supported
21 * patch7: errno may now be a macro with an lvalue
22 * patch7: in stab.c, sighandler() may now return either void or int
23 *
ffed7fef 24 * Revision 3.0.1.2 89/11/17 15:35:37 lwall
25 * patch5: sighandler() needed to be static
26 *
ae986130 27 * Revision 3.0.1.1 89/11/11 04:55:07 lwall
28 * patch2: sys_errlist[sys_nerr] is illegal
29 *
a687059c 30 * Revision 3.0 89/10/18 15:23:23 lwall
31 * 3.0 baseline
8d063cd8 32 *
33 */
34
8d063cd8 35#include "EXTERN.h"
8d063cd8 36#include "perl.h"
37
378cc40b 38#include <signal.h>
39
8d063cd8 40static char *sig_name[] = {
a687059c 41 SIG_NAME,0
42};
8d063cd8 43
663a0e37 44#ifdef VOIDSIG
45#define handlertype void
46#else
47#define handlertype int
48#endif
2e1b3b7e 49
8d063cd8 50STR *
a687059c 51stab_str(str)
52STR *str;
8d063cd8 53{
a687059c 54 STAB *stab = str->str_u.str_stab;
8d063cd8 55 register int paren;
56 register char *s;
378cc40b 57 register int i;
8d063cd8 58
a687059c 59 if (str->str_rare)
60 return stab_val(stab);
61
62 switch (*stab->str_magic->str_ptr) {
9f68db38 63 case '1': case '2': case '3': case '4':
8d063cd8 64 case '5': case '6': case '7': case '8': case '9': case '&':
65 if (curspat) {
a687059c 66 paren = atoi(stab_name(stab));
378cc40b 67 getparen:
68 if (curspat->spat_regexp &&
69 paren <= curspat->spat_regexp->nparens &&
70 (s = curspat->spat_regexp->startp[paren]) ) {
71 i = curspat->spat_regexp->endp[paren] - s;
72 if (i >= 0)
a687059c 73 str_nset(stab_val(stab),s,i);
378cc40b 74 else
a687059c 75 str_sset(stab_val(stab),&str_undef);
8d063cd8 76 }
378cc40b 77 else
a687059c 78 str_sset(stab_val(stab),&str_undef);
8d063cd8 79 }
80 break;
81 case '+':
82 if (curspat) {
378cc40b 83 paren = curspat->spat_regexp->lastparen;
84 goto getparen;
8d063cd8 85 }
86 break;
a687059c 87 case '`':
88 if (curspat) {
89 if (curspat->spat_regexp &&
90 (s = curspat->spat_regexp->subbase) ) {
91 i = curspat->spat_regexp->startp[0] - s;
92 if (i >= 0)
93 str_nset(stab_val(stab),s,i);
94 else
95 str_nset(stab_val(stab),"",0);
96 }
97 else
98 str_nset(stab_val(stab),"",0);
99 }
100 break;
101 case '\'':
102 if (curspat) {
103 if (curspat->spat_regexp &&
104 (s = curspat->spat_regexp->endp[0]) ) {
105 str_set(stab_val(stab),s);
106 }
107 else
108 str_nset(stab_val(stab),"",0);
109 }
110 break;
8d063cd8 111 case '.':
a687059c 112#ifndef lint
8d063cd8 113 if (last_in_stab) {
a687059c 114 str_numset(stab_val(stab),(double)stab_io(last_in_stab)->lines);
8d063cd8 115 }
a687059c 116#endif
8d063cd8 117 break;
118 case '?':
a687059c 119 str_numset(stab_val(stab),(double)statusvalue);
8d063cd8 120 break;
121 case '^':
a687059c 122 s = stab_io(curoutstab)->top_name;
123 str_set(stab_val(stab),s);
8d063cd8 124 break;
125 case '~':
a687059c 126 s = stab_io(curoutstab)->fmt_name;
127 str_set(stab_val(stab),s);
8d063cd8 128 break;
a687059c 129#ifndef lint
8d063cd8 130 case '=':
a687059c 131 str_numset(stab_val(stab),(double)stab_io(curoutstab)->page_len);
8d063cd8 132 break;
133 case '-':
a687059c 134 str_numset(stab_val(stab),(double)stab_io(curoutstab)->lines_left);
8d063cd8 135 break;
136 case '%':
a687059c 137 str_numset(stab_val(stab),(double)stab_io(curoutstab)->page);
8d063cd8 138 break;
a687059c 139#endif
8d063cd8 140 case '/':
9f68db38 141 if (record_separator != 12345) {
142 *tokenbuf = record_separator;
143 tokenbuf[1] = '\0';
144 str_nset(stab_val(stab),tokenbuf,rslen);
145 }
8d063cd8 146 break;
147 case '[':
a687059c 148 str_numset(stab_val(stab),(double)arybase);
8d063cd8 149 break;
150 case '|':
a687059c 151 str_numset(stab_val(stab),
152 (double)((stab_io(curoutstab)->flags & IOF_FLUSH) != 0) );
8d063cd8 153 break;
154 case ',':
a687059c 155 str_nset(stab_val(stab),ofs,ofslen);
8d063cd8 156 break;
157 case '\\':
a687059c 158 str_nset(stab_val(stab),ors,orslen);
8d063cd8 159 break;
160 case '#':
a687059c 161 str_set(stab_val(stab),ofmt);
8d063cd8 162 break;
163 case '!':
a687059c 164 str_numset(stab_val(stab), (double)errno);
663a0e37 165 str_set(stab_val(stab), strerror(errno));
a687059c 166 stab_val(stab)->str_nok = 1; /* what a wonderful hack! */
378cc40b 167 break;
168 case '<':
a687059c 169 str_numset(stab_val(stab),(double)uid);
378cc40b 170 break;
171 case '>':
a687059c 172 str_numset(stab_val(stab),(double)euid);
378cc40b 173 break;
174 case '(':
a687059c 175 s = buf;
176 (void)sprintf(s,"%d",(int)gid);
378cc40b 177 goto add_groups;
178 case ')':
a687059c 179 s = buf;
180 (void)sprintf(s,"%d",(int)egid);
378cc40b 181 add_groups:
182 while (*s) s++;
183#ifdef GETGROUPS
184#ifndef NGROUPS
185#define NGROUPS 32
186#endif
187 {
188 GIDTYPE gary[NGROUPS];
189
190 i = getgroups(NGROUPS,gary);
191 while (--i >= 0) {
a687059c 192 (void)sprintf(s," %ld", (long)gary[i]);
378cc40b 193 while (*s) s++;
194 }
195 }
196#endif
a687059c 197 str_set(stab_val(stab),buf);
8d063cd8 198 break;
199 }
a687059c 200 return stab_val(stab);
8d063cd8 201}
202
a687059c 203stabset(mstr,str)
204register STR *mstr;
8d063cd8 205STR *str;
206{
a687059c 207 STAB *stab = mstr->str_u.str_stab;
8d063cd8 208 char *s;
209 int i;
663a0e37 210 static handlertype sighandler();
8d063cd8 211
a687059c 212 switch (mstr->str_rare) {
213 case 'E':
214 setenv(mstr->str_ptr,str_get(str));
215 /* And you'll never guess what the dog had */
216 break; /* in its mouth... */
217 case 'S':
218 s = str_get(str);
219 i = whichsig(mstr->str_ptr); /* ...no, a brick */
220 if (strEQ(s,"IGNORE"))
221#ifndef lint
222 (void)signal(i,SIG_IGN);
223#else
224 ;
225#endif
226 else if (strEQ(s,"DEFAULT") || !*s)
227 (void)signal(i,SIG_DFL);
228 else
229 (void)signal(i,sighandler);
230 break;
231#ifdef SOME_DBM
232 case 'D':
233 hdbmstore(stab_hash(stab),mstr->str_ptr,mstr->str_cur,str);
234 break;
235#endif
236 case '#':
237 afill(stab_array(stab), (int)str_gnum(str) - arybase);
238 break;
239 case 'X': /* merely a copy of a * string */
240 break;
241 case '*':
242 s = str_get(str);
9f68db38 243 if (strNE(s,"StB") || str->str_cur != sizeof(STBP)) {
a687059c 244 if (!*s) {
245 STBP *stbp;
246
247 (void)savenostab(stab); /* schedule a free of this stab */
248 if (stab->str_len)
249 Safefree(stab->str_ptr);
250 Newz(601,stbp, 1, STBP);
251 stab->str_ptr = stbp;
252 stab->str_len = stab->str_cur = sizeof(STBP);
253 stab->str_pok = 1;
9f68db38 254 strcpy(stab_magic(stab),"StB");
a687059c 255 stab_val(stab) = Str_new(70,0);
256 stab_line(stab) = line;
257 }
258 else
259 stab = stabent(s,TRUE);
260 str_sset(str,stab);
261 }
262 break;
263 case 's': {
264 struct lstring *lstr = (struct lstring*)str;
265
266 mstr->str_rare = 0;
267 str->str_magic = Nullstr;
268 str_insert(mstr,lstr->lstr_offset,lstr->lstr_len,
269 str->str_ptr,str->str_cur);
270 }
271 break;
272
273 case 'v':
274 do_vecset(mstr,str);
275 break;
276
277 case 0:
278 switch (*stab->str_magic->str_ptr) {
9f68db38 279 case '.':
280 if (localizing)
281 savesptr((STR**)&last_in_stab);
282 break;
8d063cd8 283 case '^':
a687059c 284 Safefree(stab_io(curoutstab)->top_name);
285 stab_io(curoutstab)->top_name = s = savestr(str_get(str));
286 stab_io(curoutstab)->top_stab = stabent(s,TRUE);
8d063cd8 287 break;
288 case '~':
a687059c 289 Safefree(stab_io(curoutstab)->fmt_name);
290 stab_io(curoutstab)->fmt_name = s = savestr(str_get(str));
291 stab_io(curoutstab)->fmt_stab = stabent(s,TRUE);
8d063cd8 292 break;
293 case '=':
a687059c 294 stab_io(curoutstab)->page_len = (long)str_gnum(str);
8d063cd8 295 break;
296 case '-':
a687059c 297 stab_io(curoutstab)->lines_left = (long)str_gnum(str);
298 if (stab_io(curoutstab)->lines_left < 0L)
299 stab_io(curoutstab)->lines_left = 0L;
8d063cd8 300 break;
301 case '%':
a687059c 302 stab_io(curoutstab)->page = (long)str_gnum(str);
8d063cd8 303 break;
304 case '|':
a687059c 305 stab_io(curoutstab)->flags &= ~IOF_FLUSH;
8d063cd8 306 if (str_gnum(str) != 0.0) {
a687059c 307 stab_io(curoutstab)->flags |= IOF_FLUSH;
8d063cd8 308 }
309 break;
310 case '*':
a687059c 311 i = (int)str_gnum(str);
312 multiline = (i != 0);
8d063cd8 313 break;
314 case '/':
79a0689e 315 if (str->str_pok) {
9f68db38 316 record_separator = *str_get(str);
317 rslen = str->str_cur;
318 }
319 else {
320 record_separator = 12345; /* fake a non-existent char */
321 rslen = 1;
322 }
8d063cd8 323 break;
324 case '\\':
325 if (ors)
a687059c 326 Safefree(ors);
8d063cd8 327 ors = savestr(str_get(str));
a687059c 328 orslen = str->str_cur;
8d063cd8 329 break;
330 case ',':
331 if (ofs)
a687059c 332 Safefree(ofs);
8d063cd8 333 ofs = savestr(str_get(str));
a687059c 334 ofslen = str->str_cur;
8d063cd8 335 break;
336 case '#':
337 if (ofmt)
a687059c 338 Safefree(ofmt);
8d063cd8 339 ofmt = savestr(str_get(str));
340 break;
341 case '[':
342 arybase = (int)str_gnum(str);
343 break;
378cc40b 344 case '?':
345 statusvalue = (unsigned short)str_gnum(str);
346 break;
8d063cd8 347 case '!':
348 errno = (int)str_gnum(str); /* will anyone ever use this? */
349 break;
378cc40b 350 case '<':
378cc40b 351 uid = (int)str_gnum(str);
a687059c 352#ifdef SETREUID
353 if (delaymagic) {
354 delaymagic |= DM_REUID;
355 break; /* don't do magic till later */
356 }
357#endif /* SETREUID */
358#ifdef SETRUID
359 if (setruid((UIDTYPE)uid) < 0)
360 uid = (int)getuid();
361#else
362#ifdef SETREUID
363 if (setreuid((UIDTYPE)uid, (UIDTYPE)-1) < 0)
378cc40b 364 uid = (int)getuid();
365#else
366 fatal("setruid() not implemented");
367#endif
a687059c 368#endif
378cc40b 369 break;
370 case '>':
378cc40b 371 euid = (int)str_gnum(str);
a687059c 372#ifdef SETREUID
373 if (delaymagic) {
374 delaymagic |= DM_REUID;
375 break; /* don't do magic till later */
376 }
377#endif /* SETREUID */
378#ifdef SETEUID
379 if (seteuid((UIDTYPE)euid) < 0)
380 euid = (int)geteuid();
381#else
382#ifdef SETREUID
383 if (setreuid((UIDTYPE)-1, (UIDTYPE)euid) < 0)
378cc40b 384 euid = (int)geteuid();
385#else
386 fatal("seteuid() not implemented");
387#endif
a687059c 388#endif
378cc40b 389 break;
390 case '(':
a687059c 391 gid = (int)str_gnum(str);
392#ifdef SETREGID
393 if (delaymagic) {
394 delaymagic |= DM_REGID;
395 break; /* don't do magic till later */
396 }
397#endif /* SETREGID */
378cc40b 398#ifdef SETRGID
a687059c 399 (void)setrgid((GIDTYPE)gid);
400#else
401#ifdef SETREGID
402 (void)setregid((GIDTYPE)gid, (GIDTYPE)-1);
378cc40b 403#else
404 fatal("setrgid() not implemented");
405#endif
a687059c 406#endif
378cc40b 407 break;
408 case ')':
a687059c 409 egid = (int)str_gnum(str);
410#ifdef SETREGID
411 if (delaymagic) {
412 delaymagic |= DM_REGID;
413 break; /* don't do magic till later */
414 }
415#endif /* SETREGID */
378cc40b 416#ifdef SETEGID
a687059c 417 (void)setegid((GIDTYPE)egid);
418#else
419#ifdef SETREGID
420 (void)setregid((GIDTYPE)-1, (GIDTYPE)egid);
378cc40b 421#else
422 fatal("setegid() not implemented");
423#endif
a687059c 424#endif
425 break;
426 case ':':
427 chopset = str_get(str);
378cc40b 428 break;
8d063cd8 429 }
a687059c 430 break;
378cc40b 431 }
8d063cd8 432}
433
378cc40b 434whichsig(sig)
435char *sig;
8d063cd8 436{
437 register char **sigv;
438
439 for (sigv = sig_name+1; *sigv; sigv++)
378cc40b 440 if (strEQ(sig,*sigv))
8d063cd8 441 return sigv - sig_name;
a687059c 442#ifdef SIGCLD
443 if (strEQ(sig,"CHLD"))
444 return SIGCLD;
445#endif
446#ifdef SIGCHLD
447 if (strEQ(sig,"CLD"))
448 return SIGCHLD;
449#endif
8d063cd8 450 return 0;
451}
452
663a0e37 453static handlertype
8d063cd8 454sighandler(sig)
455int sig;
456{
457 STAB *stab;
458 ARRAY *savearray;
459 STR *str;
378cc40b 460 char *oldfile = filename;
461 int oldsave = savestack->ary_fill;
a687059c 462 ARRAY *oldstack = stack;
378cc40b 463 SUBR *sub;
8d063cd8 464
a687059c 465 stab = stabent(
466 str_get(hfetch(stab_hash(sigstab),sig_name[sig],strlen(sig_name[sig]),
467 TRUE)), TRUE);
468 sub = stab_sub(stab);
469 if (!sub && *sig_name[sig] == 'C' && instr(sig_name[sig],"LD")) {
470 if (sig_name[sig][1] == 'H')
471 stab = stabent(str_get(hfetch(stab_hash(sigstab),"CLD",3,TRUE)),
472 TRUE);
473 else
474 stab = stabent(str_get(hfetch(stab_hash(sigstab),"CHLD",4,TRUE)),
475 TRUE);
476 sub = stab_sub(stab); /* gag */
477 }
378cc40b 478 if (!sub) {
479 if (dowarn)
480 warn("SIG%s handler \"%s\" not defined.\n",
a687059c 481 sig_name[sig], stab_name(stab) );
378cc40b 482 return;
483 }
a687059c 484 savearray = stab_xarray(defstab);
485 stab_xarray(defstab) = stack = anew(defstab);
486 stack->ary_flags = 0;
487 str = Str_new(71,0);
8d063cd8 488 str_set(str,sig_name[sig]);
a687059c 489 (void)apush(stab_xarray(defstab),str);
378cc40b 490 sub->depth++;
491 if (sub->depth >= 2) { /* save temporaries on recursion? */
492 if (sub->depth == 100 && dowarn)
a687059c 493 warn("Deep recursion on subroutine \"%s\"",stab_name(stab));
378cc40b 494 savelist(sub->tosave->ary_array,sub->tosave->ary_fill);
495 }
496 filename = sub->filename;
497
a687059c 498 (void)cmd_exec(sub->cmd,G_SCALAR,1); /* so do it already */
378cc40b 499
500 sub->depth--; /* assuming no longjumps out of here */
a687059c 501 str_free(stack->ary_array[0]); /* free the one real string */
502 afree(stab_xarray(defstab)); /* put back old $_[] */
503 stab_xarray(defstab) = savearray;
504 stack = oldstack;
378cc40b 505 filename = oldfile;
506 if (savestack->ary_fill > oldsave)
507 restorelist(oldsave);
8d063cd8 508}
509
8d063cd8 510STAB *
511aadd(stab)
512register STAB *stab;
513{
a687059c 514 if (!stab_xarray(stab))
515 stab_xarray(stab) = anew(stab);
8d063cd8 516 return stab;
517}
518
519STAB *
520hadd(stab)
521register STAB *stab;
522{
a687059c 523 if (!stab_xhash(stab))
524 stab_xhash(stab) = hnew(COEFFSIZE);
8d063cd8 525 return stab;
526}
378cc40b 527
528STAB *
529stabent(name,add)
530register char *name;
531int add;
532{
533 register STAB *stab;
a687059c 534 register STBP *stbp;
535 int len;
536 register char *namend;
537 HASH *stash;
538 char *sawquote = Nullch;
539 char *prevquote = Nullch;
540 bool global = FALSE;
378cc40b 541
a687059c 542 if (isascii(*name) && isupper(*name)) {
543 if (*name > 'I') {
544 if (*name == 'S' && (
545 strEQ(name, "SIG") ||
546 strEQ(name, "STDIN") ||
547 strEQ(name, "STDOUT") ||
548 strEQ(name, "STDERR") ))
549 global = TRUE;
378cc40b 550 }
a687059c 551 else if (*name > 'E') {
552 if (*name == 'I' && strEQ(name, "INC"))
553 global = TRUE;
554 }
555 else if (*name >= 'A') {
556 if (*name == 'E' && strEQ(name, "ENV"))
557 global = TRUE;
558 }
559 else if (*name == 'A' && (
560 strEQ(name, "ARGV") ||
561 strEQ(name, "ARGVOUT") ))
562 global = TRUE;
563 }
564 for (namend = name; *namend; namend++) {
565 if (*namend == '\'' && namend[1])
566 prevquote = sawquote, sawquote = namend;
567 }
568 if (sawquote == name && name[1]) {
569 stash = defstash;
570 sawquote = Nullch;
571 name++;
572 }
573 else if (!isalpha(*name) || global)
574 stash = defstash;
575 else
576 stash = curstash;
577 if (sawquote) {
578 char tmpbuf[256];
579 char *s, *d;
580
581 *sawquote = '\0';
582 if (s = prevquote) {
583 strncpy(tmpbuf,name,s-name+1);
584 d = tmpbuf+(s-name+1);
585 *d++ = '_';
586 strcpy(d,s+1);
587 }
588 else {
589 *tmpbuf = '_';
590 strcpy(tmpbuf+1,name);
591 }
592 stab = stabent(tmpbuf,TRUE);
593 if (!(stash = stab_xhash(stab)))
594 stash = stab_xhash(stab) = hnew(0);
595 name = sawquote+1;
596 *sawquote = '\'';
378cc40b 597 }
a687059c 598 len = namend - name;
599 stab = (STAB*)hfetch(stash,name,len,add);
600 if (!stab)
601 return Nullstab;
602 if (stab->str_pok) {
603 stab->str_pok |= SP_MULTI;
604 return stab;
605 }
606 else {
607 if (stab->str_len)
608 Safefree(stab->str_ptr);
609 Newz(602,stbp, 1, STBP);
610 stab->str_ptr = stbp;
611 stab->str_len = stab->str_cur = sizeof(STBP);
612 stab->str_pok = 1;
9f68db38 613 strcpy(stab_magic(stab),"StB");
a687059c 614 stab_val(stab) = Str_new(72,0);
615 stab_line(stab) = line;
616 str_magic(stab,stab,'*',name,len);
378cc40b 617 return stab;
618 }
378cc40b 619}
620
621STIO *
622stio_new()
623{
a687059c 624 STIO *stio;
378cc40b 625
a687059c 626 Newz(603,stio,1,STIO);
378cc40b 627 stio->page_len = 60;
628 return stio;
629}
630
631stab_check(min,max)
632int min;
633register int max;
634{
a687059c 635 register HENT *entry;
378cc40b 636 register int i;
637 register STAB *stab;
638
639 for (i = min; i <= max; i++) {
a687059c 640 for (entry = defstash->tbl_array[i]; entry; entry = entry->hent_next) {
641 stab = (STAB*)entry->hent_val;
642 if (stab->str_pok & SP_MULTI)
378cc40b 643 continue;
a687059c 644 line = stab_line(stab);
645 warn("Possible typo: \"%s\"", stab_name(stab));
378cc40b 646 }
647 }
648}
a687059c 649
650static int gensym = 0;
651
652STAB *
653genstab()
654{
655 (void)sprintf(tokenbuf,"_GEN_%d",gensym++);
656 return stabent(tokenbuf,TRUE);
657}
658
659/* hopefully this is only called on local symbol table entries */
660
661void
662stab_clear(stab)
663register STAB *stab;
664{
665 STIO *stio;
666 SUBR *sub;
667
668 afree(stab_xarray(stab));
669 (void)hfree(stab_xhash(stab));
670 str_free(stab_val(stab));
671 if (stio = stab_io(stab)) {
672 do_close(stab,FALSE);
673 Safefree(stio->top_name);
674 Safefree(stio->fmt_name);
675 }
676 if (sub = stab_sub(stab)) {
677 afree(sub->tosave);
678 cmd_free(sub->cmd);
679 }
680 Safefree(stab->str_ptr);
681 stab->str_ptr = Null(STBP*);
682 stab->str_len = 0;
683 stab->str_cur = 0;
684}
685
9f68db38 686#if defined(CRIPPLED_CC) && (defined(iAPX286) || defined(M_I286) || defined(I80286))
687#define MICROPORT
688#endif
689
690#ifdef MICROPORT /* Microport 2.4 hack */
691ARRAY *stab_array(stab)
692register STAB *stab;
693{
694 if (((STBP*)(stab->str_ptr))->stbp_array)
695 return ((STBP*)(stab->str_ptr))->stbp_array;
696 else
697 return ((STBP*)(aadd(stab)->str_ptr))->stbp_array;
698}
699
700HASH *stab_hash(stab)
701register STAB *stab;
702{
703 if (((STBP*)(stab->str_ptr))->stbp_hash)
704 return ((STBP*)(stab->str_ptr))->stbp_hash;
705 else
706 return ((STBP*)(hadd(stab)->str_ptr))->stbp_hash;
707}
708#endif /* Microport 2.4 hack */