Now lattr() accepts an output delimiter as a second argument.
*** ../vanilla-1.7.7p25/src/function.c 2003-10-31 15:07:05.000000000 +0000
--- src/function.c 2003-12-24 12:31:18.000000000 +0000
***************
*** 311,317 ****
{"ITEMIZE", fun_itemize, 1, 4, FN_REG},
{"ITEXT", fun_itext, 1, 1, FN_REG},
{"LAST", fun_last, 1, 2, FN_REG},
! {"LATTR", fun_lattr, 1, 1, FN_REG},
{"LCON", fun_lcon, 1, 1, FN_REG},
{"LCSTR", fun_lcstr, 1, -1, FN_REG},
{"LDELETE", fun_ldelete, 2, 3, FN_REG},
--- 311,317 ----
{"ITEMIZE", fun_itemize, 1, 4, FN_REG},
{"ITEXT", fun_itext, 1, 1, FN_REG},
{"LAST", fun_last, 1, 2, FN_REG},
! {"LATTR", fun_lattr, 1, 2, FN_REG},
{"LCON", fun_lcon, 1, 1, FN_REG},
{"LCSTR", fun_lcstr, 1, -1, FN_REG},
{"LDELETE", fun_ldelete, 2, 3, FN_REG},
*** ../vanilla-1.7.7p25/src/fundb.c 2003-10-31 15:07:05.000000000 +0000
--- src/fundb.c 2003-12-24 12:31:54.000000000 +0000
***************
*** 79,84 ****
--- 79,85 ----
int first; /**< Is this is the first attribute, or later? */
char *buff; /**< Buffer to store output */
char **bp; /**< Pointer to address of insertion point in buff */
+ char delim; /**< Delimiter */
};
/* this function produces a space-separated list of attributes that are
***************
*** 95,101 ****
if (lh->first)
lh->first = 0;
else
! safe_chr(' ', lh->buff, lh->bp);
safe_str(AL_NAME(atr), lh->buff, lh->bp);
return 1;
}
--- 96,102 ----
if (lh->first)
lh->first = 0;
else
! safe_chr(lh->delim, lh->buff, lh->bp);
safe_str(AL_NAME(atr), lh->buff, lh->bp);
return 1;
}
***************
*** 107,112 ****
--- 108,118 ----
char *pattern;
struct lh_args lh;
+ if (args[1] && *args[1])
+ lh.delim = *args[1];
+ else
+ lh.delim = ' ';
+
pattern = strchr(args[0], '/');
if (pattern)
*pattern++ = '\0';