/*)LIBRARY
*/
/*
 * P$DPACK - Pack dynamic single choice menu
 *
 * Restricted access: handles only one field, thus requires
 * multiple calls.  Also, doesn't support both 'DFLT' and 'KEYWnn'
 * fields in the same call.
 */
extern dpack();

p$dpack(fid, buf, keyw, p1, p2, clear, stat)
char *fid;                             /* Field ID */
char *buf;                             /* Field 'value' buffer */
char *keyw;                            /* "DFLT" or "KEYWnn" */
int p1, p2;                            /* Parameter(s) for above */
int clear;                             /* TRUE = clear dynamic buffer */
int stat[2];                           /* 2-word status */
   {
   int fidl, keyl, bufl;

   fidl = strlen(fid);
   bufl = strlen(buf);
   keyl = strlen(keyw);
   call(dpack, (clear) ? 10 : 9, stat, fid, &fidl, buf, &bufl,
      keyw, &keyl, &p1, &p2, "CLRB");
   return(stat[0]);
   }

