1: #include "../h/rt.h"
   2: 
   3: /*
   4:  * pos(i) - test if &pos is at position i in &subject.
   5:  */
   6: Xpos(nargs, arg1, arg0)
   7: int nargs;
   8: struct descrip arg1, arg0;
   9:    {
  10:    register int i;
  11:    long l;
  12: 
  13:    /*
  14:     * i must be an integer.
  15:     */
  16:    if (cvint(&arg1, &l) == NULL)
  17:       runerr(101, &arg1);
  18: 
  19:    /*
  20:     * Fail if &pos isn't equivalent to i, return i otherwise.
  21:     */
  22:    if ((i = cvpos(l, STRLEN(k_subject))) != k_pos)
  23:       fail();
  24:    arg0.type = D_INTEGER;
  25:    INTVAL(arg0) = i;
  26:    }
  27: 
  28: Procblock(pos,1)

Defined functions

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