X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/6e21c824d91ef0b4ae60b95b347e344e5bb4d38a..60165aa4bc7ef12661c54168e5dd07abb3881564:/form.h diff --git a/form.h b/form.h index 8be33e1..7ddeb71 100644 --- a/form.h +++ b/form.h @@ -1,45 +1,27 @@ -/* $RCSfile: form.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:08:20 $ +/* form.h * - * Copyright (c) 1991, Larry Wall + * Copyright (C) 1991, 1992, 1993, 2000, 2004, 2011 by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * - * $Log: form.h,v $ - * Revision 4.0.1.1 91/06/07 11:08:20 lwall - * patch4: new copyright notice - * - * Revision 4.0 91/03/20 01:19:37 lwall - * 4.0 baseline. - * */ -#define F_NULL 0 -#define F_LEFT 1 -#define F_RIGHT 2 -#define F_CENTER 3 -#define F_LINES 4 -#define F_DECIMAL 5 - -struct formcmd { - struct formcmd *f_next; - ARG *f_expr; - STR *f_unparsed; - line_t f_line; - char *f_pre; - short f_presize; - short f_size; - short f_decimals; - char f_type; - char f_flags; -}; - -#define FC_CHOP 1 -#define FC_NOBLANK 2 -#define FC_MORE 4 -#define FC_REPEAT 8 -#define FC_DP 16 - -#define Nullfcmd Null(FCMD*) - -EXT char *chopset INIT(" \n-"); +#define FF_END 0 /* tidy up, then return */ +#define FF_LINEMARK 1 /* start (or end) of a line */ +#define FF_LITERAL 2 /* append literal chars */ +#define FF_SKIP 3 /* skip chars in format */ +#define FF_FETCH 4 /* get next item and set field size to */ +#define FF_CHECKNL 5 /* find max len of item (up to \n) that fits field */ +#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */ +#define FF_SPACE 7 /* append padding space (diff of field, item size) */ +#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */ +#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */ +#define FF_CHOP 10 /* (for ^*) chop the current item */ +#define FF_LINEGLOB 11 /* process @* */ +#define FF_DECIMAL 12 /* do @##, ^##, where =(precision|flags) */ +#define FF_NEWLINE 13 /* delete trailing spaces, then append \n */ +#define FF_BLANK 14 /* for arg==0: do '~'; for arg>0 : do '~~' */ +#define FF_MORE 15 /* replace long end of string with '...' */ +#define FF_0DECIMAL 16 /* like FF_DECIMAL but for 0### */ +#define FF_LINESNGL 17 /* process ^* */