View Raw SPL
_txtjust(text, justify)
{
        local tstr;

        switch (justify)
        {
                case 0:
                default:
                        /* center */
                        tstr = sprintf("\g%s\g", text);
                        break;

                case 2:
                        /* right */
                        tstr = sprintf("\g%s ", text);
                        break;

                case 1:
                        /* left */
                        tstr = sprintf(" %s\g", text);
                        break;
        }
        return(tstr);
}