|
|
1.1 ! root 1: #include "../h/rt.h" ! 2: ! 3: /* ! 4: * defstr - if dp is null, default to def; otherwise, convert to string. ! 5: * *dp gets a descriptor for the resulting string. buf is used as ! 6: * a scratch buffer for the conversion (if necessary). ! 7: */ ! 8: ! 9: defstr(dp, buf, def) ! 10: struct descrip *dp; ! 11: char *buf; ! 12: struct descrip *def; ! 13: { ! 14: DeRef(*dp) ! 15: if (NULLDESC(*dp)) { ! 16: *dp = *def; ! 17: return 1; ! 18: } ! 19: if (cvstr(dp, buf) == NULL) ! 20: runerr(103, dp); ! 21: return 0; ! 22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.