1: #include "../h/rt.h"
   2: 
   3: /*
   4:  * string(x) - convert x to string.
   5:  */
   6: 
   7: Xstring(nargs, arg1, arg0)
   8: int nargs;
   9: struct descrip arg1, arg0;
  10:    {
  11:    char sbuf[MAXSTRING];
  12:    extern char *alcstr();
  13: 
  14:    arg0 = arg1;
  15:    switch (cvstr(&arg0, sbuf)) {
  16:       /*
  17:        * If x isn't a string, allocate it and return it; if it is a
  18:        *  string, just return it; fail if it isn't a string and can't
  19:        *  be converted.
  20:        */
  21:       case 1:
  22:          sneed(STRLEN(arg0));
  23:          STRLOC(arg0) = alcstr(STRLOC(arg0), STRLEN(arg0));
  24:       case 2:
  25:          return;
  26:       default:
  27:          fail();
  28:       }
  29:    }
  30: 
  31: Procblock(string,1)

Defined functions

Xstring defined in line 7; never used
Last modified: 1984-11-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 515
Valid CSS Valid XHTML 1.0 Strict