about the "str" module

crux-00029: $SRC/tup/README.tup

* "tup": dynamically allocated arrays of xpr expressions

  The interface is largely self evident.

  A an array of xprs is properly declared and initialized this way:

      #include "strt/strt.h"
      #include "xpr/xpr.h"
      #include "tup/tup.h"

      struct tup a_tup = {0};

    int tup_length (struct tup *);
      Return the length of a tup.

    struct xpr_ref const * tup_view_ro (struct tup const *, int pos, int l);
    struct xpr_ref * tup_view_rw (struct tup *, int pos, int l);
      Return a pointer to elements of a tup.

    void tup_set_length (struct tup *, int l);
      Change the length of a tup, nil padding if needed.

    void tup_trim (struct tup *);
      Compact a tup in memory if it is allocated larger than
      it needs to be.

    void tup_copy (struct tup *, struct tup *);
       Copy a tup.

/*

    This file is part of Crux.

    Crux is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Crux is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Crux.  If not, see <http://www.gnu.org/licenses/>.

*/